We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63335d9 commit c20ad4aCopy full SHA for c20ad4a
1 file changed
pyinstaller.spec
@@ -1,4 +1,15 @@
1
# -*- mode: python ; coding: utf-8 -*-
2
+
3
+# Apply patch
4
+from openpectus.lang.exec import units
5
+before = """cache_folder = os.path.join(os.path.dirname(__file__), "pint-cache")
6
+ureg = UnitRegistry(cache_folder=cache_folder)"""
7
+after = "ureg = UnitRegistry()"
8
+with open(units.__file__, "r") as f:
9
+ original_contents = f.read()
10
+with open(units.__file__, "w") as f:
11
+ f.write(original_contents.replace(before, after))
12
13
from PyInstaller.utils.hooks import collect_all
14
15
datas, binaries, hiddenimports = collect_all('openpectus')
@@ -43,3 +54,7 @@ exe = EXE(
43
54
entitlements_file=None,
44
55
icon=['openpectus_engine_manager_gui/icon.ico'],
45
56
)
57
58
+# Undo patch
59
60
+ f.write(original_contents)
0 commit comments