|
7 | 7 | from distutils.sysconfig import get_config_var |
8 | 8 | from distutils.version import LooseVersion |
9 | 9 |
|
10 | | -version = "1.3.2+geomagical.1" |
| 10 | +version = "1.3.2+geomagical.3" |
11 | 11 | compiler_args = ["-g", '-DVERSION="%s"' % version] |
12 | 12 |
|
13 | 13 | openexr_lib = "openexr-install/lib64" |
14 | 14 | if not os.path.exists(openexr_lib): |
15 | 15 | openexr_lib = "openexr-install/lib" |
16 | 16 |
|
| 17 | +lib_suffix = ".so.25" |
| 18 | +link_args = [f"-Wl,-rpath,$ORIGIN/{openexr_lib}"] |
17 | 19 | if sys.platform == "darwin": |
| 20 | + lib_suffix = ".25.dylib" |
| 21 | + link_args = [] |
18 | 22 | compiler_args.append("-std=c++14") |
19 | 23 | if "MACOSX_DEPLOYMENT_TARGET" not in os.environ: |
20 | 24 | current_system = LooseVersion(platform.mac_ver()[0]) |
|
38 | 42 | library_dirs=[openexr_lib], |
39 | 43 | libraries=["Iex", "Half", "Imath", "IlmImf", "z"], |
40 | 44 | extra_compile_args=compiler_args, |
41 | | - extra_link_args=["-Wl,-rpath," + openexr_lib], |
| 45 | + extra_link_args=link_args, |
42 | 46 | ) |
43 | 47 | ], |
44 | 48 | py_modules=["Imath"], |
45 | 49 | packages=[""], |
46 | 50 | package_data={ |
47 | 51 | "": [ |
48 | | - openexr_lib + "/libIex-2_5.so.25", |
49 | | - openexr_lib + "/libHalf-2_5.so.25", |
50 | | - openexr_lib + "/libImath-2_5.so.25", |
51 | | - openexr_lib + "/libIlmImf-2_5.so.25", |
52 | | - openexr_lib + "/libIexMath-2_5.so.25", |
53 | | - openexr_lib + "/libIlmThread-2_5.so.25", |
| 52 | + f"{openexr_lib}/libIex-2_5{lib_suffix}", |
| 53 | + f"{openexr_lib}/libHalf-2_5{lib_suffix}", |
| 54 | + f"{openexr_lib}/libImath-2_5{lib_suffix}", |
| 55 | + f"{openexr_lib}/libIlmImf-2_5{lib_suffix}", |
| 56 | + f"{openexr_lib}/libIexMath-2_5{lib_suffix}", |
| 57 | + f"{openexr_lib}/libIlmThread-2_5{lib_suffix}", |
54 | 58 | ] |
55 | 59 | }, |
56 | 60 | ) |
0 commit comments