aboutsummaryrefslogtreecommitdiffstats
path: root/release/rtool.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-03-12 18:55:25 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-03-12 18:55:25 +0100
commite0f1f13c14f33eca3f163a89e6e77ae39b174a1f (patch)
tree2a5ca3b5084696c069d2f631e3db9c53dae6b3ae /release/rtool.py
parent2d31c5c78674daf6622ef8d9b7b1b84201a3324b (diff)
downloadmitmproxy-e0f1f13c14f33eca3f163a89e6e77ae39b174a1f.tar.gz
mitmproxy-e0f1f13c14f33eca3f163a89e6e77ae39b174a1f.tar.bz2
mitmproxy-e0f1f13c14f33eca3f163a89e6e77ae39b174a1f.zip
minor pyinstaller fixes
Diffstat (limited to 'release/rtool.py')
-rwxr-xr-xrelease/rtool.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/release/rtool.py b/release/rtool.py
index 5929452a..221ace0a 100755
--- a/release/rtool.py
+++ b/release/rtool.py
@@ -34,6 +34,7 @@ else:
RELEASE_DIR = join(os.path.dirname(os.path.realpath(__file__)))
DIST_DIR = join(RELEASE_DIR, "dist")
ROOT_DIR = os.path.normpath(join(RELEASE_DIR, ".."))
+RELEASE_SPEC_DIR = join(RELEASE_DIR, "specs")
VERSION_FILE = join(ROOT_DIR, "netlib/version.py")
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():
with Archive(join(DIST_DIR, archive_name(bdist_project))) as archive:
for tool in tools:
- spec = join(RELEASE_DIR, "specs/%s.spec" % tool)
- print("Building %s binary..." % tool)
- subprocess.check_call(
- [
- VENV_PYINSTALLER,
- "--clean",
- "--workpath", PYINSTALLER_TEMP,
- "--distpath", PYINSTALLER_DIST,
- # This is PyInstaller, so setting a
- # different log level obviously breaks it :-)
- # "--log-level", "WARN",
- spec
- ]
- )
+ # This is PyInstaller, so it messes up paths.
+ # We need to make sure that we are in the spec folder.
+ with chdir(RELEASE_SPEC_DIR):
+ print("Building %s binary..." % tool)
+ subprocess.check_call(
+ [
+ VENV_PYINSTALLER,
+ "--clean",
+ "--workpath", PYINSTALLER_TEMP,
+ "--distpath", PYINSTALLER_DIST,
+ # This is PyInstaller, so setting a
+ # different log level obviously breaks it :-)
+ # "--log-level", "WARN",
+ "%s.spec" % tool
+ ]
+ )
# Test if it works at all O:-)
executable = join(PYINSTALLER_DIST, tool)