Skip to content

Commit c2dd659

Browse files
de11nElliot Cameron
authored and
Elliot Cameron
committed
Fix setup.py to respect numpy's parsing of libraries in site.cfg
numpy parses libraries in site.cfg by splitting on comma. We want to maintain compatibility with that, but we've already established os.pathname by accident. To minimize breakages, we support both.
1 parent 4b2d89c commit c2dd659

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ def parse_site_cfg():
7171
site['mkl']['include_dirs'].split(os.pathsep))
7272
lib_dirs.extend(
7373
site['mkl']['library_dirs'].split(os.pathsep))
74+
# numpy's site.cfg splits libraries by comma, but numexpr historically split by os.pathsep.
75+
# For compatibility, we split by both.
7476
libs.extend(
75-
site['mkl']['libraries'].split(os.pathsep))
77+
site['mkl']['libraries'].replace(os.pathsep, ',').split(','))
7678
def_macros.append(('USE_VML', None))
7779
print(f'FOUND MKL IMPORT')
7880

0 commit comments

Comments
 (0)