minor pyinstaller fixes

This commit is contained in:
Maximilian Hils 2016-03-12 18:55:25 +01:00
parent 2d31c5c786
commit e0f1f13c14

View File

@ -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,7 +227,9 @@ 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)
# 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(
[
@ -237,7 +240,7 @@ def bdist(ctx, use_existing_wheels, pyinstaller_version):
# This is PyInstaller, so setting a
# different log level obviously breaks it :-)
# "--log-level", "WARN",
spec
"%s.spec" % tool
]
)