Skip to content

Commit aed1774

Browse files
author
y-p
committed
Merge pull request #5844 from y-p/PR_msgpack_setup
BLD: fix cythonized msgpack extension in setup.py GH5831
2 parents 06d9d06 + 88010ab commit aed1774

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ def pxd(name):
487487

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

0 commit comments

Comments
 (0)