mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Tune debug mode
This commit is contained in:
parent
aac72ed3a3
commit
4823278f11
14
setup.py
14
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'],
|
||||
|
|
Loading…
Reference in New Issue
Block a user