mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 07:36:12 +00:00
Ticket #181: fixes some types on Mac
git-svn-id: http://svn.pyinstaller.org/trunk@859 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
@@ -6,12 +6,12 @@ CTYPES_DIR = "ctypes"
|
||||
TEST_LIB = os.path.join(CTYPES_DIR, "testctypes")
|
||||
if sys.platform == "linux2":
|
||||
TEST_LIB += ".so"
|
||||
elif sys.platform == "darwin2":
|
||||
elif sys.platform[:6] == "darwin":
|
||||
TEST_LIB += ".dylib"
|
||||
elif sys.platform == "win32":
|
||||
TEST_LIB += ".dll"
|
||||
else:
|
||||
raise NotImplentedError
|
||||
raise NotImplementedError
|
||||
|
||||
# If the required dylib does not reside in the current directory, the Analysis
|
||||
# class machinery, based on ctypes.util.find_library, will not find it. This was
|
||||
@@ -22,7 +22,7 @@ os.environ["LD_LIBRARY_PATH"] = CTYPES_DIR
|
||||
# Check for presence of testctypes shared library, build it if not present
|
||||
if not os.path.exists(TEST_LIB):
|
||||
os.chdir(CTYPES_DIR)
|
||||
if sys.platform == "darwin2":
|
||||
if sys.platform[:6] == "darwin":
|
||||
os.system("gcc -Wall -dynamiclib testctypes.c -o testctypes.dylib -headerpad_max_install_names")
|
||||
id_dylib = os.path.abspath("testctypes.dylib")
|
||||
os.system("install_name_tool -id %s testctypes.dylib" % (id_dylib,))
|
||||
|
||||
Reference in New Issue
Block a user