python-dependency-injector/setup.py

92 lines
3.1 KiB
Python
Raw Normal View History

2015-08-31 13:31:38 +00:00
"""`Dependency injector` setup script."""
2015-01-04 13:54:25 +00:00
2016-11-02 15:21:40 +00:00
import os
import re
from setuptools import setup, Extension
2015-01-04 13:54:25 +00:00
2015-04-02 22:01:05 +00:00
2016-11-02 22:06:14 +00:00
# Defining setup variables:
defined_macros = dict()
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 0
2016-11-02 22:06:14 +00:00
# Getting description:
2015-04-02 21:31:26 +00:00
with open('README.rst') as readme_file:
description = readme_file.read()
2015-01-05 09:11:21 +00:00
# Getting requirements:
with open('requirements.txt') as requirements_file:
requirements = requirements_file.readlines()
2015-01-04 13:54:25 +00:00
# Getting version:
2016-11-02 20:58:30 +00:00
with open('src/dependency_injector/__init__.py') as init_file:
version = re.search('__version__ = \'(.*?)\'', init_file.read()).group(1)
2015-01-04 13:54:25 +00:00
2016-11-02 22:06:14 +00:00
# Adding debug options:
2016-11-02 15:21:40 +00:00
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
defined_macros['CYTHON_TRACE'] = 1
defined_macros['CYTHON_TRACE_NOGIL'] = 1
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 1
2016-11-02 15:21:40 +00:00
2015-01-04 13:54:25 +00:00
setup(name='dependency-injector',
2015-04-03 13:11:05 +00:00
version=version,
2016-10-12 07:41:50 +00:00
description='Dependency injection microframework for Python',
2015-04-03 13:11:05 +00:00
long_description=description,
2016-01-11 08:53:35 +00:00
author='ETS Labs',
2015-04-03 13:11:05 +00:00
author_email='rmogilatov@gmail.com',
2016-03-17 00:02:17 +00:00
maintainer='Roman Mogilatov',
2015-04-03 13:11:05 +00:00
maintainer_email='rmogilatov@gmail.com',
2016-04-25 08:07:47 +00:00
url='https://github.com/ets-labs/python-dependency-injector',
2016-03-17 00:02:17 +00:00
download_url='https://pypi.python.org/pypi/dependency_injector',
install_requires=requirements,
2016-11-02 20:58:30 +00:00
packages=[
'dependency_injector',
],
package_dir={
2016-11-02 21:55:14 +00:00
'': 'src',
2016-11-02 20:58:30 +00:00
},
ext_modules=[
Extension('dependency_injector.containers',
['src/dependency_injector/containers.c'],
define_macros=list(defined_macros.items()),
extra_compile_args=['-O2']),
Extension('dependency_injector.providers',
['src/dependency_injector/providers.c'],
define_macros=list(defined_macros.items()),
2016-11-04 13:48:26 +00:00
extra_compile_args=['-O2']),
],
2016-11-02 22:56:30 +00:00
package_data={
'dependency_injector': ['*.pxd'],
},
2015-04-03 13:11:05 +00:00
zip_safe=True,
license='BSD New',
platforms=['any'],
2015-04-03 13:21:42 +00:00
keywords=[
2016-03-17 00:02:17 +00:00
'Dependency injection',
2016-11-11 16:36:35 +00:00
'DI',
2016-03-17 00:02:17 +00:00
'Inversion of Control',
2016-11-11 16:36:35 +00:00
'IoC',
'Factory',
'Singleton',
'Design patterns',
2015-04-03 13:21:42 +00:00
],
2015-04-03 13:11:05 +00:00
classifiers=[
2015-11-26 13:50:12 +00:00
'Development Status :: 5 - Production/Stable',
2015-04-03 13:11:05 +00:00
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
2015-10-12 15:20:20 +00:00
'Programming Language :: Python :: 3.5',
2017-01-29 22:12:08 +00:00
'Programming Language :: Python :: 3.6',
2015-04-03 13:11:05 +00:00
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
])