Get python lib dir dynamically
This commit is contained in:
parent
301c209eb3
commit
61c9afb821
@ -29,6 +29,7 @@ import os
|
|||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
|
from distutils.sysconfig import get_python_lib
|
||||||
|
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
@ -47,13 +48,7 @@ def get_egl_path():
|
|||||||
"""Get the path for PyQt5's libEGL.dll."""
|
"""Get the path for PyQt5's libEGL.dll."""
|
||||||
if not sys.platform.startswith('win'):
|
if not sys.platform.startswith('win'):
|
||||||
return None
|
return None
|
||||||
bits = platform.architecture()[0]
|
return os.path.join(get_python_lib(), r'PyQt5\libEGL.dll')
|
||||||
if bits == '32bit':
|
|
||||||
return r'C:\Python33_x32\Lib\site-packages\PyQt5\libEGL.dll'
|
|
||||||
elif bits == '64bit':
|
|
||||||
return r'C:\Python33\Lib\site-packages\PyQt5\libEGL.dll'
|
|
||||||
else:
|
|
||||||
raise ValueError("Unknown architecture")
|
|
||||||
|
|
||||||
build_exe_options = {
|
build_exe_options = {
|
||||||
'include_files': [
|
'include_files': [
|
||||||
|
Loading…
Reference in New Issue
Block a user