6
TEST_LIB = os.path.join(CTYPES_DIR, "testctypes")
7
if sys.platform == "linux2":
9
elif sys.platform == "darwin2":
11
elif sys.platform == "win32":
14
raise NotImplentedError
16
# If the required dylib does not reside in the current directory, the Analysis
17
# class machinery, based on ctypes.util.find_library, will not find it. This was
18
# done on purpose for this test, to show how to give Analysis class a clue.
19
os.environ["DYLD_LIBRARY_PATH"] = CTYPES_DIR
20
os.environ["LD_LIBRARY_PATH"] = CTYPES_DIR
22
# Check for presence of testctypes shared library, build it if not present
23
if not os.path.exists(TEST_LIB):
25
if sys.platform == "darwin2":
26
os.system("gcc -Wall -dynamiclib testctypes.c -o testctypes.dylib -headerpad_max_install_names")
27
id_dylib = os.path.abspath("testctypes.dylib")
28
os.system("install_name_tool -id %s testctypes.dylib" % (id_dylib,))
29
elif sys.platform == "linux2":
30
os.system("gcc -fPIC -shared testctypes.c -o testctypes.so")
32
raise NotImplementedError
35
__testname__ = 'test15'
37
a = Analysis(['../support/_mountzlib.py',
38
'../support/useUnicode.py',
45
name=os.path.join('dist', __testname__),