diff --git a/setup.py b/setup.py index 56c753ea..cb684564 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,10 @@ import re from setuptools import setup, Extension +# Defining setup variables: +defined_macros = list() +package_data = dict([('dependency_injector', ['*.pxd'])]) + # Getting description: with open('README.rst') as readme_file: description = readme_file.read() @@ -18,12 +22,14 @@ with open('requirements.txt') as version: with open('src/dependency_injector/__init__.py') as init_file: version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1) -# Defining macros: -defined_macros = list() +# Adding debug options: if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1': defined_macros.append(('CYTHON_TRACE', 1)) defined_macros.append(('CYTHON_TRACE_NOGIL', 1)) + package_data['dependency_injector'].append('*.pyx') + package_data['dependency_injector'].append('*.c') + setup(name='dependency-injector', version=version, @@ -49,9 +55,7 @@ setup(name='dependency-injector', define_macros=defined_macros, extra_compile_args=['-O2']), ], - package_data={ - 'dependency_injector': ['*.pxd'] - }, + package_data=package_data, zip_safe=True, license='BSD New', platforms=['any'],