Skip to content

Commit eb48812

Browse files
committed
BLD: link against m library in sparse ext too pandas-dev#1955
1 parent 9c0f46d commit eb48812

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
380380
'pandas/src/datetime/np_datetime_strings.h']
381381

382382
# some linux distros require it
383-
libraries = ['m'] if 'win' not in sys.platform else []
383+
libraries = ['m'] if 'win32' not in sys.platform else []
384384

385385
lib_ext = Extension('pandas.lib',
386386
depends=lib_depends,
@@ -393,6 +393,11 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
393393
# extra_compile_args=['-Wconversion']
394394
)
395395

396+
sparse_ext = Extension('pandas._sparse',
397+
sources=[srcpath('sparse', suffix=suffix)],
398+
include_dirs=[np.get_include()],
399+
libraries=libraries)
400+
396401
period_ext = Extension('pandas._period',
397402
depends=plib_depends + ['pandas/src/numpy_helper.h',
398403
'pandas/src/period.h'],
@@ -402,10 +407,6 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
402407
include_dirs=[np.get_include()])
403408

404409

405-
sparse_ext = Extension('pandas._sparse',
406-
sources=[srcpath('sparse', suffix=suffix)],
407-
include_dirs=[np.get_include()])
408-
409410
sandbox_ext = Extension('pandas._sandbox',
410411
sources=[srcpath('sandbox', suffix=suffix)],
411412
include_dirs=[np.get_include()])

0 commit comments

Comments
 (0)