Skip to content

Commit

Permalink
Revert patching (included in silx 2.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Nov 28, 2023
1 parent b911921 commit a92aa1d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions build-pyinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
os.path.join(".", "build-" + sys.platform),
os.path.join(".", "dist-" + sys.platform))

# patch PyOpenGL without importing it
try:
import fisx
fname = os.path.join(os.path.dirname(os.path.dirname(fisx.__file__)), "OpenGL", "__init__.py")
if os.path.exists(fname):
infile = open(fname, "rb").read()
infile = infile.replace(b'_bi + ".CArgObject",' ,
b'("_ctypes" if sys.version_info[:2] >= (3,12) else _bi) + ".CArgObject",')
outfile = open(fname, "wb").write(infile)
infile = None
outfile = None
except Exception:
print("Cannot patch PyOpenGL")

if sys.platform.startswith("darwin"):
if "arm64" in sys.argv:
os.putenv("PYMCA_PYINSTALLER_TARGET_ARCH", "arm64")
Expand Down

0 comments on commit a92aa1d

Please sign in to comment.