Skip to content

Commit d284430

Browse files
authored
Merge pull request #2713 from wangzhaode/feature/pymnn_bugfix
[Pymnn:Bugfix] Bugfix of pymnn mac build.
2 parents 4a19b1e + 40dbd86 commit d284430

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pymnn/pip_package/setup.py

Lines changed: 7 additions & 2 deletions
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)