Skip to content

Commit 40dbd86

Browse files
committed
[Pymnn:Bugfix] Bugfix of pymnn mac build.
1 parent 4a19b1e commit 40dbd86

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pymnn/pip_package/setup.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ def report(*args):
8888
print ("USE_VULKAN:", USE_VULKAN)
8989
print ("USE_RENDER:", USE_RENDER)
9090

91-
if USE_INTERNAL:
91+
if os.path.isdir('../../schema/private'):
9292
package_name += '_Internal'
93+
else:
94+
USE_INTERNAL = False
95+
9396
if USE_TRT:
9497
package_name += '_TRT'
9598
if USE_CUDA:
@@ -352,7 +355,9 @@ def configure_extension_build():
352355
def make_relative_rpath(path):
353356
""" make rpath """
354357
if IS_DARWIN:
355-
return ['-Wl,-rpath,@loader_path/' + path]
358+
# dylibs instal at .../lib/ for
359+
# .../lib/python*/site-packages/_mnncengine.cpython-*-darwin.so
360+
return ['-Wl,-rpath,@loader_path/../../../' + path]
356361
elif IS_WINDOWS:
357362
return []
358363
else:

0 commit comments

Comments
 (0)