Skip to content

Commit 9328164

Browse files
committed
🎨 Trying to fix some rpath issues.
1 parent 987d63c commit 9328164

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

‎setup.py‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
from distutils.sysconfig import get_config_var
88
from distutils.version import LooseVersion
99

10-
version = "1.3.2+geomagical.1"
10+
version = "1.3.2+geomagical.3"
1111
compiler_args = ["-g", '-DVERSION="%s"' % version]
1212

1313
openexr_lib = "openexr-install/lib64"
1414
if not os.path.exists(openexr_lib):
1515
openexr_lib = "openexr-install/lib"
1616

17+
lib_suffix = ".so.25"
18+
link_args = [f"-Wl,-rpath,$ORIGIN/{openexr_lib}"]
1719
if sys.platform == "darwin":
20+
lib_suffix = ".25.dylib"
21+
link_args = []
1822
compiler_args.append("-std=c++14")
1923
if "MACOSX_DEPLOYMENT_TARGET" not in os.environ:
2024
current_system = LooseVersion(platform.mac_ver()[0])
@@ -38,19 +42,19 @@
3842
library_dirs=[openexr_lib],
3943
libraries=["Iex", "Half", "Imath", "IlmImf", "z"],
4044
extra_compile_args=compiler_args,
41-
extra_link_args=["-Wl,-rpath," + openexr_lib],
45+
extra_link_args=link_args,
4246
)
4347
],
4448
py_modules=["Imath"],
4549
packages=[""],
4650
package_data={
4751
"": [
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}",
5458
]
5559
},
5660
)

0 commit comments

Comments
 (0)