Skip to content

Commit

Permalink
[Pymnn:Bugfix] Bugfix of pymnn mac build.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhaode committed Dec 29, 2023
1 parent 4a19b1e commit 40dbd86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pymnn/pip_package/setup.py
Original file line number Diff line number Diff line change
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 40dbd86

Please sign in to comment.