Skip to content

Commit

Permalink
fix inclusion of .cpp utility files in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Jul 9, 2012
1 parent e4c4c87 commit f297715
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,13 @@ def run(self):
p+'/*.pxd' for p in pxd_include_dirs ] + [
p+'/*.pyx' for p in pxd_include_dirs ]

if sys.version_info < (2,4):
install_base_dir = get_python_lib(prefix='')
import glob
patterns = pxd_include_patterns + [
'Cython/Plex/*.pxd',
'Cython/Compiler/*.pxd',
'Cython/Runtime/*.pyx'
]
setup_args['data_files'] = [
(os.path.dirname(os.path.join(install_base_dir, pattern)),
[ f for f in glob.glob(pattern) ])
for pattern in patterns
]
else:
setup_args['package_data'] = {
'Cython.Plex' : ['*.pxd'],
'Cython.Compiler' : ['*.pxd'],
'Cython.Runtime' : ['*.pyx', '*.pxd'],
'Cython.Utility' : ['*.pyx', '*.pxd', '*.c', '*.h', '.cpp'],
'Cython' : [ p[7:] for p in pxd_include_patterns ],
}
setup_args['package_data'] = {
'Cython.Plex' : ['*.pxd'],
'Cython.Compiler' : ['*.pxd'],
'Cython.Runtime' : ['*.pyx', '*.pxd'],
'Cython.Utility' : ['*.pyx', '*.pxd', '*.c', '*.h', '*.cpp'],
'Cython' : [ p[7:] for p in pxd_include_patterns ],
}

# This dict is used for passing extra arguments that are setuptools
# specific to setup
Expand Down

0 comments on commit f297715

Please sign in to comment.