ifcpatch make.py (#1319)

This commit is contained in:
Long
2021-02-13 16:23:59 +07:00
committed by GitHub
parent 1b2bebecb0
commit 73a9015801
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# This can be packaged with `pyinstaller --onefile --clean --icon=icon.ico ifcpatch.py`
# This can be packaged into one executable with ./make.py
import ifcopenshell
import logging
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import os
import subprocess
# add hidden imports in recipes here
HIDDEN_IMPORTS = [
"ifcopenshell.util.selector",
"ifcopenshell.util.element",
"ifcopenshell.util.schema",
"toposort",
]
def main():
hiddenimport_args = " ".join('--hiddenimport "{}"'.format(imp) for imp in HIDDEN_IMPORTS)
cmd = 'pyinstaller ./__init__.py --onefile --clean --add-data ".{}ifcpatch" {}'.format(
os.pathsep, hiddenimport_args
)
subprocess.check_output(cmd, shell=True)
if __name__ == "__main__":
main()