Skip to content

BLD: fix cythonized msgpack extension in setup.py GH5831 #5844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
1 commit merged into from Jan 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ def pxd(name):

msgpack_ext = Extension('pandas.msgpack',
sources = [srcpath('msgpack',
suffix=suffix, subdir='')],
suffix=suffix if suffix == '.pyx' else '.cpp',
subdir='')],
language='c++',
include_dirs=common_include,
define_macros=macros)
Expand All @@ -499,7 +500,7 @@ def pxd(name):
if suffix == '.pyx' and 'setuptools' in sys.modules:
# undo dumb setuptools bug clobbering .pyx sources back to .c
for ext in extensions:
if ext.sources[0].endswith('.c'):
if ext.sources[0].endswith(('.c','.cpp')):
root, _ = os.path.splitext(ext.sources[0])
ext.sources[0] = root + suffix

Expand Down