Show More
@@ -3,19 +3,16 b' ROOT = CWD + "/../.."' | |||
|
3 | 3 | # Code to run in Python interpreter. |
|
4 | 4 | RUN_CODE = "import hgdemandimport; hgdemandimport.enable(); from mercurial import dispatch; dispatch.run()" |
|
5 | 5 | |
|
6 | ||
|
7 | 6 | set_build_path(ROOT + "/build/pyoxidizer") |
|
8 | 7 | |
|
9 | ||
|
10 | 8 | def make_distribution(): |
|
11 | 9 | return default_python_distribution() |
|
12 | 10 | |
|
13 | ||
|
14 | 11 | def make_distribution_windows(): |
|
15 | 12 | return default_python_distribution(flavor="standalone_dynamic") |
|
16 | 13 | |
|
17 | ||
|
18 | 14 | def make_exe(dist): |
|
15 | """Builds a Rust-wrapped Mercurial binary.""" | |
|
19 | 16 | config = PythonInterpreterConfig( |
|
20 | 17 | raw_allocator = "system", |
|
21 | 18 | run_eval = RUN_CODE, |
@@ -58,23 +55,20 b' def make_exe(dist):' | |||
|
58 | 55 | # On Windows, we install extra packages for convenience. |
|
59 | 56 | if "windows" in BUILD_TARGET_TRIPLE: |
|
60 | 57 | exe.add_python_resources( |
|
61 | dist.pip_install(["-r", ROOT + "/contrib/packaging/requirements_win32.txt"]) | |
|
58 | dist.pip_install(["-r", ROOT + "/contrib/packaging/requirements_win32.txt"]), | |
|
62 | 59 | ) |
|
63 | 60 | |
|
64 | 61 | return exe |
|
65 | 62 | |
|
66 | ||
|
67 | 63 | def make_manifest(dist, exe): |
|
68 | 64 | m = FileManifest() |
|
69 | 65 | m.add_python_resource(".", exe) |
|
70 | 66 | |
|
71 | 67 | return m |
|
72 | 68 | |
|
73 | ||
|
74 | 69 | def make_embedded_resources(exe): |
|
75 | 70 | return exe.to_embedded_resources() |
|
76 | 71 | |
|
77 | ||
|
78 | 72 | register_target("distribution_posix", make_distribution) |
|
79 | 73 | register_target("distribution_windows", make_distribution_windows) |
|
80 | 74 |
General Comments 0
You need to be logged in to leave comments.
Login now