From 4823278f1169e5afadbcca2f338832f941f6ccb8 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Thu, 3 Nov 2016 00:06:14 +0200 Subject: [PATCH] Tune debug mode --- setup.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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'],