mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-29 04:53:59 +03:00
fa469618dd
* Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Add files via upload * Update README.rst * Rename Blank Diagram (1).svg to di-map.svg * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Add files via upload * Rename Blank Diagram (2).svg to di-map2.svg * Update README.rst * Update README.rst * Update README.rst * Update README.rst * Add files via upload * Add files via upload * Rename README.svg to di-map3.svg * Update README.rst * Add files via upload * Rename README - Page 3.svg to di-map4.svg * Update README.rst * Add files via upload * Rename README - Copy of Page 3.svg to di-map5.svg * Update README.rst * Delete di-map.svg * Delete di-map2.svg * Delete di-map3.svg * Delete di-map4.svg * Update README.rst * Update README.rst * Add Github Navigator - Flask application * Do more refactoring for ghnav-flask * More refactoring * Update README * Add tests * Update readme * Add Flask extension * Add Factory.provides attribute * Add Flask extension module * User flask extension in githubnavigator example * Add README for ghnav-flask * Update ghnav-flask README * Update ghnav-flask README * Update README with ghnav container example * Move ghnav-flask to miniapps/ folder * Fix auth token reading from env for ghnav-flask * Update readme * Fix ghnav-flask linter errors * Add downloads and wheel badge * Add tests for flask extension * Fix flask tests * Add requirements-ext.txt installation to tox.ini * Add API docs for ext.flask module * Update setup.py * Add Flask to the list of keywords * Update badges on docs README * Update docs README title * Fix ext.flask tests * Fix syntax of ext.flask for Python 2.7, 3.4, 3.5 * Fix syntax of ext.flask for Python 2.7, 3.4, 3.5 * Fix imports in ext.flask for Python 2.7, 3.4, 3.5 * Update ghfnav-flask README * Update ghfnav-flask README * Remove setting of empty github token * Add flask extras * Update requirements * Update requirements * Add flask extra to python 3.4 tox.ini * Update changelog * Update changelog
104 lines
3.4 KiB
Python
104 lines
3.4 KiB
Python
"""`Dependency injector` setup script."""
|
|
|
|
import os
|
|
import re
|
|
|
|
from setuptools import setup, Extension
|
|
|
|
|
|
# Defining setup variables:
|
|
defined_macros = dict()
|
|
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 0
|
|
|
|
# Getting description:
|
|
with open('README.rst') as readme_file:
|
|
description = readme_file.read()
|
|
|
|
# Getting requirements:
|
|
with open('requirements.txt') as requirements_file:
|
|
requirements = requirements_file.readlines()
|
|
|
|
# Getting version:
|
|
with open('src/dependency_injector/__init__.py') as init_file:
|
|
version = re.search('__version__ = \'(.*?)\'', init_file.read()).group(1)
|
|
|
|
# Adding debug options:
|
|
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
|
|
|
|
|
|
setup(name='dependency-injector',
|
|
version=version,
|
|
description='Dependency injection microframework for Python',
|
|
long_description=description,
|
|
author='ETS Labs',
|
|
author_email='rmogilatov@gmail.com',
|
|
maintainer='Roman Mogilatov',
|
|
maintainer_email='rmogilatov@gmail.com',
|
|
url='https://github.com/ets-labs/python-dependency-injector',
|
|
download_url='https://pypi.python.org/pypi/dependency_injector',
|
|
packages=[
|
|
'dependency_injector',
|
|
'dependency_injector.ext',
|
|
],
|
|
package_dir={
|
|
'': 'src',
|
|
},
|
|
package_data={
|
|
'dependency_injector': ['*.pxd'],
|
|
},
|
|
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()),
|
|
extra_compile_args=['-O2']),
|
|
],
|
|
install_requires=requirements,
|
|
extras_require={
|
|
'yaml': [
|
|
'pyyaml',
|
|
],
|
|
'flask': [
|
|
'flask',
|
|
],
|
|
},
|
|
zip_safe=True,
|
|
license='BSD New',
|
|
platforms=['any'],
|
|
keywords=[
|
|
'Dependency injection',
|
|
'DI',
|
|
'Inversion of Control',
|
|
'IoC',
|
|
'Factory',
|
|
'Singleton',
|
|
'Design patterns',
|
|
'Flask',
|
|
],
|
|
classifiers=[
|
|
'Development Status :: 5 - Production/Stable',
|
|
'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',
|
|
'Programming Language :: Python :: 3.5',
|
|
'Programming Language :: Python :: 3.6',
|
|
'Programming Language :: Python :: 3.7',
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
|
'Topic :: Software Development',
|
|
'Topic :: Software Development :: Libraries',
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
])
|