Skip to content

Commit 88010ab

Browse files
author
y-p
committed
BLD: fix cythonized msgpack extension in setup.py GH5831
1 parent fede3c0 commit 88010ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,8 @@ def pxd(name):
486486

487487
msgpack_ext = Extension('pandas.msgpack',
488488
sources = [srcpath('msgpack',
489-
suffix=suffix, subdir='')],
489+
suffix=suffix if suffix == '.pyx' else '.cpp',
490+
subdir='')],
490491
language='c++',
491492
include_dirs=common_include,
492493
define_macros=macros)
@@ -499,7 +500,7 @@ def pxd(name):
499500
if suffix == '.pyx' and 'setuptools' in sys.modules:
500501
# undo dumb setuptools bug clobbering .pyx sources back to .c
501502
for ext in extensions:
502-
if ext.sources[0].endswith('.c'):
503+
if ext.sources[0].endswith(('.c','.cpp')):
503504
root, _ = os.path.splitext(ext.sources[0])
504505
ext.sources[0] = root + suffix
505506

0 commit comments

Comments
 (0)