python-dependency-injector/setup.py

124 lines
4.1 KiB
Python
Raw Normal View History

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
import re
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:
defined_macros = dict()
2021-10-01 03:24:53 +03:00
defined_macros["CYTHON_CLINE_IN_TRACEBACK"] = 0
2016-11-03 01:06:14 +03:00
# Getting description:
2021-10-01 03:24:53 +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
# Getting requirements:
2021-10-01 03:24:53 +03:00
with open("requirements.txt") as requirements_file:
requirements = requirements_file.readlines()
2015-01-04 16:54:25 +03:00
# Getting version:
2021-10-01 03:24:53 +03:00
with open("src/dependency_injector/__init__.py") as init_file:
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:
2021-10-01 03:24:53 +03: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 18:21:40 +03:00
2015-01-04 16:54:25 +03:00
2021-10-01 03:24:53 +03:00
setup(name="dependency-injector",
2015-04-03 16:11:05 +03:00
version=version,
2021-10-01 03:24:53 +03:00
description="Dependency injection framework for Python",
2015-04-03 16:11:05 +03:00
long_description=description,
2021-10-01 03:24:53 +03:00
author="Roman Mogylatov",
author_email="rmogilatov@gmail.com",
maintainer="Roman Mogylatov",
maintainer_email="rmogilatov@gmail.com",
url="https://github.com/ets-labs/python-dependency-injector",
download_url="https://pypi.python.org/pypi/dependency_injector",
2020-06-25 04:01:33 +03:00
packages=[
2021-10-01 03:24:53 +03:00
"dependency_injector",
"dependency_injector.ext",
2020-06-25 04:01:33 +03:00
],
2016-11-02 23:58:30 +03:00
package_dir={
2021-10-01 03:24:53 +03:00
"": "src",
2016-11-02 23:58:30 +03:00
},
2020-06-25 04:01:33 +03:00
package_data={
2021-10-01 03:24:53 +03:00
"dependency_injector": ["*.pxd", "*.pyi", "py.typed"],
2020-06-25 04:01:33 +03:00
},
ext_modules=[
2021-10-01 03:24:53 +03:00
Extension("dependency_injector.containers",
["src/dependency_injector/containers.c"],
define_macros=list(defined_macros.items()),
2021-10-01 03:24:53 +03:00
extra_compile_args=["-O2"]),
Extension("dependency_injector.providers",
["src/dependency_injector/providers.c"],
define_macros=list(defined_macros.items()),
2021-10-01 03:24:53 +03:00
extra_compile_args=["-O2"]),
Extension("dependency_injector._cwiring",
["src/dependency_injector/_cwiring.c"],
define_macros=list(defined_macros.items()),
extra_compile_args=["-O2"]),
],
2020-06-25 04:01:33 +03:00
install_requires=requirements,
extras_require={
2021-10-01 03:24:53 +03:00
"yaml": [
"pyyaml",
2020-06-25 04:01:33 +03:00
],
2021-10-01 03:24:53 +03:00
"pydantic": [
"pydantic",
],
2021-10-01 03:24:53 +03:00
"flask": [
"flask",
Readme update (#263) * 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
2020-07-11 19:15:00 +03:00
],
2021-10-01 03:24:53 +03:00
"aiohttp": [
"aiohttp",
],
2016-11-03 01:56:30 +03:00
},
2015-04-03 16:11:05 +03:00
zip_safe=True,
2021-10-01 03:24:53 +03:00
license="BSD New",
platforms=["any"],
2015-04-03 16:21:42 +03:00
keywords=[
2021-10-01 03:24:53 +03:00
"Dependency injection",
"DI",
"Inversion of Control",
"IoC",
"Factory",
"Singleton",
"Design patterns",
"Flask",
2015-04-03 16:21:42 +03:00
],
2015-04-03 16:11:05 +03:00
classifiers=[
2021-10-01 03:24:53 +03:00
"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.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
2022-10-31 04:30:24 +03:00
"Programming Language :: Python :: 3.11",
2021-10-01 03:24:53 +03:00
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: AsyncIO",
"Framework :: Bottle",
"Framework :: Django",
"Framework :: Flask",
"Framework :: Pylons",
"Framework :: Pyramid",
"Framework :: Pytest",
"Framework :: TurboGears",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
2015-04-03 16:11:05 +03:00
])