Skip to content

Commit cee4e1e

Browse files
Add patch for Pyinstaller bug (CQ-1519)
1 parent c5ba687 commit cee4e1e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

build_conquest_python.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,13 @@ def main():
758758
"fullName = '/System/Library/Frameworks/OpenGL.framework/OpenGL'"),
759759
)
760760

761+
# Patch Pyinstaller to fix https://github.com/pyinstaller/pyinstaller/issues/5540
762+
# The actual fix for this isn't in any of the 3.x versions, and 4.x onwards require Python 3 :(
763+
if Package().linux:
764+
command = ["patch", os.path.join(os.path.dirname(os.path.abspath(__file__)), "pyinstaller.patch")]
765+
package_path = ConquestPythonPackage().python_base_directory / 'lib' / 'python2.7' / 'site-packages'
766+
subprocess.run(command, cwd=package_path)
767+
761768
if not Package().windows:
762769
bdb_env = dict(os.environ)
763770
bdb_env['BERKELEYDB_DIR'] = f'{ConquestPythonPackage().python_base_directory}'

pyinstaller.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/PyInstaller/depend/utils.py b/PyInstaller/depend/utils.py
2+
index 4776676b7..eca1e9dd8 100644
3+
--- a/PyInstaller/depend/utils.py
4+
+++ b/PyInstaller/depend/utils.py
5+
@@ -372,6 +372,8 @@ def load_ldconfig_cache():
6+
for line in text:
7+
# :fixme: this assumes libary names do not contain whitespace
8+
m = pattern.match(line)
9+
+ if m is None:
10+
+ continue
11+
path = m.groups()[-1]
12+
if is_freebsd:
13+
# Insert `.so` at the end of the lib's basename. soname

0 commit comments

Comments
 (0)