Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/jittor/test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/python3

# ***************************************************************
# Copyright (c) 2022 Jittor. All Rights Reserved.
# Maintainers: Dun Liang <[email protected]>.
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************
10 changes: 10 additions & 0 deletions python/jittor/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/python3
# ***************************************************************
# Copyright (c) 2022 Jittor. All Rights Reserved.
# Maintainers:
# Guowei Yang <[email protected]>
# Dun Liang <[email protected]>.
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************
7 changes: 5 additions & 2 deletions python/jittor_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def search_file(dirs, name):
LOG.f(f"file {name} not found in {dirs}")

if __name__ == "__main__":
help_msg = f"Usage: {sys.executable} -m jittor_utils.config --include-flags|--link-flags|--cxx-flags|--cxx-example|--help"
help_msg = f"Usage: {sys.executable} -m jittor_utils.config --include-flags|--libs-flags|--cxx-flags|--cxx-example|--help"
if len(sys.argv) <= 1:
print(help_msg)
sys.exit(1)
Expand All @@ -38,7 +38,10 @@ def search_file(dirs, name):
for libbase in libpaths:
libpath = os.path.join(libbase, f"lib{base}.{libext}")
if os.path.isfile(libpath):
s += f" -L{libbase} -l{base} -ldl "
if os.name == "posix":
s += f" -Wl,-rpath={libbase} -L{libbase} -l{base} -ldl "
else:
s += f" -L{libbase} -l{base} -ldl "
break
else:
raise RuntimeError("Python dynamic library not found")
Expand Down