Skip to content

Commit

Permalink
Merge pull request #2713 from wangzhaode/feature/pymnn_bugfix
Browse files Browse the repository at this point in the history
[Pymnn:Bugfix] Bugfix of pymnn mac build.
  • Loading branch information
wangzhaode committed Dec 29, 2023
2 parents 4a19b1e + 40dbd86 commit d284430
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pymnn/pip_package/setup.py
Expand Up @@ -88,8 +88,11 @@ def report(*args):
print ("USE_VULKAN:", USE_VULKAN)
print ("USE_RENDER:", USE_RENDER)

if USE_INTERNAL:
if os.path.isdir('../../schema/private'):
package_name += '_Internal'
else:
USE_INTERNAL = False

if USE_TRT:
package_name += '_TRT'
if USE_CUDA:
Expand Down Expand Up @@ -352,7 +355,9 @@ def configure_extension_build():
def make_relative_rpath(path):
""" make rpath """
if IS_DARWIN:
return ['-Wl,-rpath,@loader_path/' + path]
# dylibs instal at .../lib/ for
# .../lib/python*/site-packages/_mnncengine.cpython-*-darwin.so
return ['-Wl,-rpath,@loader_path/../../../' + path]
elif IS_WINDOWS:
return []
else:
Expand Down

0 comments on commit d284430

Please sign in to comment.