mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
minor pyinstaller fixes
This commit is contained in:
parent
2d31c5c786
commit
e0f1f13c14
@ -34,6 +34,7 @@ else:
|
|||||||
RELEASE_DIR = join(os.path.dirname(os.path.realpath(__file__)))
|
RELEASE_DIR = join(os.path.dirname(os.path.realpath(__file__)))
|
||||||
DIST_DIR = join(RELEASE_DIR, "dist")
|
DIST_DIR = join(RELEASE_DIR, "dist")
|
||||||
ROOT_DIR = os.path.normpath(join(RELEASE_DIR, ".."))
|
ROOT_DIR = os.path.normpath(join(RELEASE_DIR, ".."))
|
||||||
|
RELEASE_SPEC_DIR = join(RELEASE_DIR, "specs")
|
||||||
VERSION_FILE = join(ROOT_DIR, "netlib/version.py")
|
VERSION_FILE = join(ROOT_DIR, "netlib/version.py")
|
||||||
|
|
||||||
BUILD_DIR = join(RELEASE_DIR, "build")
|
BUILD_DIR = join(RELEASE_DIR, "build")
|
||||||
@ -226,20 +227,22 @@ def bdist(ctx, use_existing_wheels, pyinstaller_version):
|
|||||||
for bdist_project, tools in project["bdists"].items():
|
for bdist_project, tools in project["bdists"].items():
|
||||||
with Archive(join(DIST_DIR, archive_name(bdist_project))) as archive:
|
with Archive(join(DIST_DIR, archive_name(bdist_project))) as archive:
|
||||||
for tool in tools:
|
for tool in tools:
|
||||||
spec = join(RELEASE_DIR, "specs/%s.spec" % tool)
|
# This is PyInstaller, so it messes up paths.
|
||||||
print("Building %s binary..." % tool)
|
# We need to make sure that we are in the spec folder.
|
||||||
subprocess.check_call(
|
with chdir(RELEASE_SPEC_DIR):
|
||||||
[
|
print("Building %s binary..." % tool)
|
||||||
VENV_PYINSTALLER,
|
subprocess.check_call(
|
||||||
"--clean",
|
[
|
||||||
"--workpath", PYINSTALLER_TEMP,
|
VENV_PYINSTALLER,
|
||||||
"--distpath", PYINSTALLER_DIST,
|
"--clean",
|
||||||
# This is PyInstaller, so setting a
|
"--workpath", PYINSTALLER_TEMP,
|
||||||
# different log level obviously breaks it :-)
|
"--distpath", PYINSTALLER_DIST,
|
||||||
# "--log-level", "WARN",
|
# This is PyInstaller, so setting a
|
||||||
spec
|
# different log level obviously breaks it :-)
|
||||||
]
|
# "--log-level", "WARN",
|
||||||
)
|
"%s.spec" % tool
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# Test if it works at all O:-)
|
# Test if it works at all O:-)
|
||||||
executable = join(PYINSTALLER_DIST, tool)
|
executable = join(PYINSTALLER_DIST, tool)
|
||||||
|
Loading…
Reference in New Issue
Block a user