2015-08-31 16:31:38 +03:00
|
|
|
"""`Dependency injector` setup script."""
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-11-02 18:21:40 +03:00
|
|
|
import os
|
2015-10-23 15:20:25 +03:00
|
|
|
import re
|
|
|
|
|
2016-10-31 12:31:56 +03:00
|
|
|
from setuptools import setup, Extension
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2015-04-03 01:01:05 +03:00
|
|
|
|
2016-11-03 01:06:14 +03:00
|
|
|
# Defining setup variables:
|
2017-08-08 19:27:33 +03:00
|
|
|
defined_macros = dict()
|
|
|
|
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 0
|
2016-11-03 01:06:14 +03:00
|
|
|
|
2015-10-23 15:20:25 +03:00
|
|
|
# Getting description:
|
2015-04-03 00:31:26 +03:00
|
|
|
with open('README.rst') as readme_file:
|
2020-07-11 20:18:52 +03:00
|
|
|
description = readme_file.read()
|
2015-01-05 12:11:21 +03:00
|
|
|
|
2015-10-23 15:20:25 +03:00
|
|
|
# Getting requirements:
|
2016-12-04 14:13:29 +03:00
|
|
|
with open('requirements.txt') as requirements_file:
|
|
|
|
requirements = requirements_file.readlines()
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2015-10-23 15:20:25 +03:00
|
|
|
# Getting version:
|
2016-11-02 23:58:30 +03:00
|
|
|
with open('src/dependency_injector/__init__.py') as init_file:
|
2016-12-04 14:13:29 +03:00
|
|
|
version = re.search('__version__ = \'(.*?)\'', init_file.read()).group(1)
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-11-03 01:06:14 +03:00
|
|
|
# Adding debug options:
|
2016-11-02 18:21:40 +03:00
|
|
|
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
|
2017-08-08 19:27:33 +03:00
|
|
|
defined_macros['CYTHON_TRACE'] = 1
|
|
|
|
defined_macros['CYTHON_TRACE_NOGIL'] = 1
|
|
|
|
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 1
|
2016-11-02 18:21:40 +03:00
|
|
|
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-09-06 13:18:43 +03:00
|
|
|
setup(name='dependency-injector',
|
2015-04-03 16:11:05 +03:00
|
|
|
version=version,
|
2016-10-12 10:41:50 +03:00
|
|
|
description='Dependency injection microframework for Python',
|
2015-04-03 16:11:05 +03:00
|
|
|
long_description=description,
|
2016-01-11 11:53:35 +03:00
|
|
|
author='ETS Labs',
|
2015-04-03 16:11:05 +03:00
|
|
|
author_email='rmogilatov@gmail.com',
|
2016-03-17 03:02:17 +03:00
|
|
|
maintainer='Roman Mogilatov',
|
2015-04-03 16:11:05 +03:00
|
|
|
maintainer_email='rmogilatov@gmail.com',
|
2016-04-25 11:07:47 +03:00
|
|
|
url='https://github.com/ets-labs/python-dependency-injector',
|
2016-03-17 03:02:17 +03:00
|
|
|
download_url='https://pypi.python.org/pypi/dependency_injector',
|
2020-06-25 04:01:33 +03:00
|
|
|
packages=[
|
|
|
|
'dependency_injector',
|
2020-07-11 19:15:00 +03:00
|
|
|
'dependency_injector.ext',
|
2020-06-25 04:01:33 +03:00
|
|
|
],
|
2016-11-02 23:58:30 +03:00
|
|
|
package_dir={
|
2016-11-03 00:55:14 +03:00
|
|
|
'': 'src',
|
2016-11-02 23:58:30 +03:00
|
|
|
},
|
2020-06-25 04:01:33 +03:00
|
|
|
package_data={
|
2020-08-27 05:24:20 +03:00
|
|
|
'dependency_injector': ['*.pxd', '*.pyi', 'py.typed'],
|
2020-06-25 04:01:33 +03:00
|
|
|
},
|
2016-10-31 12:31:56 +03:00
|
|
|
ext_modules=[
|
2017-03-26 16:40:41 +03:00
|
|
|
Extension('dependency_injector.containers',
|
|
|
|
['src/dependency_injector/containers.c'],
|
2017-08-08 19:27:33 +03:00
|
|
|
define_macros=list(defined_macros.items()),
|
2017-03-26 16:40:41 +03:00
|
|
|
extra_compile_args=['-O2']),
|
2017-03-25 23:38:48 +03:00
|
|
|
Extension('dependency_injector.providers',
|
|
|
|
['src/dependency_injector/providers.c'],
|
2017-08-08 19:27:33 +03:00
|
|
|
define_macros=list(defined_macros.items()),
|
2016-11-04 16:48:26 +03:00
|
|
|
extra_compile_args=['-O2']),
|
2016-10-31 12:31:56 +03:00
|
|
|
],
|
2020-06-25 04:01:33 +03:00
|
|
|
install_requires=requirements,
|
|
|
|
extras_require={
|
|
|
|
'yaml': [
|
|
|
|
'pyyaml',
|
|
|
|
],
|
2020-07-11 19:15:00 +03:00
|
|
|
'flask': [
|
|
|
|
'flask',
|
|
|
|
],
|
2020-07-29 02:19:05 +03:00
|
|
|
'aiohttp': [
|
|
|
|
'aiohttp',
|
|
|
|
],
|
2016-11-03 01:56:30 +03:00
|
|
|
},
|
2015-04-03 16:11:05 +03:00
|
|
|
zip_safe=True,
|
2016-10-31 12:31:56 +03:00
|
|
|
license='BSD New',
|
|
|
|
platforms=['any'],
|
2015-04-03 16:21:42 +03:00
|
|
|
keywords=[
|
2016-03-17 03:02:17 +03:00
|
|
|
'Dependency injection',
|
2016-11-11 19:36:35 +03:00
|
|
|
'DI',
|
2016-03-17 03:02:17 +03:00
|
|
|
'Inversion of Control',
|
2016-11-11 19:36:35 +03:00
|
|
|
'IoC',
|
2017-02-01 14:07:44 +03:00
|
|
|
'Factory',
|
|
|
|
'Singleton',
|
|
|
|
'Design patterns',
|
2020-07-11 19:15:00 +03:00
|
|
|
'Flask',
|
2015-04-03 16:21:42 +03:00
|
|
|
],
|
2015-04-03 16:11:05 +03:00
|
|
|
classifiers=[
|
2015-11-26 16:50:12 +03:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2015-04-03 16:11:05 +03: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 18:20:20 +03:00
|
|
|
'Programming Language :: Python :: 3.5',
|
2017-01-30 01:12:08 +03:00
|
|
|
'Programming Language :: Python :: 3.6',
|
2018-08-17 00:17:47 +03:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2020-01-26 23:00:21 +03:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2015-04-03 16:11:05 +03:00
|
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
2020-07-21 00:02:32 +03:00
|
|
|
'Framework :: AsyncIO',
|
|
|
|
'Framework :: Bottle',
|
|
|
|
'Framework :: Django',
|
|
|
|
'Framework :: Flask',
|
|
|
|
'Framework :: Pylons',
|
|
|
|
'Framework :: Pyramid',
|
|
|
|
'Framework :: Pytest',
|
|
|
|
'Framework :: TurboGears',
|
2015-04-03 16:11:05 +03:00
|
|
|
'Topic :: Software Development',
|
|
|
|
'Topic :: Software Development :: Libraries',
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
|
|
])
|