Skip to content

Commit a75eaf4

Browse files
committed
few native setup improvements
1 parent e945f16 commit a75eaf4

File tree

1 file changed

+5
-2
lines changed
  • graalpython/com.oracle.graal.python.cext

1 file changed

+5
-2
lines changed

graalpython/com.oracle.graal.python.cext/setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@
5858
libhpy_name = "libhpy"
5959
libposix_name = "libposix"
6060

61+
MACOS = sys.platform == "darwin"
6162
verbosity = '--verbose' if sys.flags.verbose else '--quiet'
62-
darwin_native = sys.platform == "darwin" and __graalpython__.platform_id == "native"
63+
darwin_native = MACOS and __graalpython__.platform_id == "native"
6364
relative_rpath = "@loader_path" if darwin_native else r"$ORIGIN"
6465
so_ext = get_config_var("EXT_SUFFIX")
6566
SOABI = get_config_var("SOABI")
6667
is_managed = 'managed' in SOABI
67-
lib_ext = 'dylib' if sys.platform == "darwin" else 'so'
68+
lib_ext = 'dylib' if MACOS else 'so'
6869

6970
# configure logger
7071
logger = logging.getLogger(__name__)
@@ -361,6 +362,8 @@ def __init__(self, name, subdir="modules", files=None, deps=[], **kwargs):
361362
# common case: just a single file which is the module's name plus the file extension
362363
if not files:
363364
self.files = [name + ".c"]
365+
else:
366+
self.files = files
364367
self.kwargs = kwargs
365368

366369
def __call__(self):

0 commit comments

Comments
 (0)