-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.py
63 lines (42 loc) · 1.28 KB
/
package.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
early = globals()["early"]
name = "python"
authors = ["Guido van Rossum"]
description = "The Python programming language"
@early()
def version():
"""Define Python version from command line option
"""
import sys
import argparse
if any(help_ in sys.argv[1:] for help_ in ["-h", "--help"]):
# Skip parsing version string if user is asking for help,
# or the following parser will print out it's own help
# message without rez-build's.
return ""
parser = argparse.ArgumentParser()
with open("./parse_build_args.py", "r") as add_args:
exec(add_args.read(), {"parser": parser})
args, unknown = parser.parse_known_args() # parse `sys.argv`
local_patch = "+1"
python_version = args.version + local_patch
return python_version
tools = [
"python",
"pythonw",
"pip",
]
variants = [
["platform-*"],
]
private_build_requires = ["rezutil-1"]
build_command = "python {root}/rezbuild.py {install}"
def commands():
env = globals()["env"]
system = globals()["system"]
if system.platform == "windows":
env.PATH.prepend("{root}/payload")
env.PATH.prepend("{root}/payload/Scripts")
else:
# untested
env.PATH.prepend("{root}/payload/bin")
uuid = "repository.python"