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
|
2015-10-23 12:20:25 +00:00
|
|
|
import re
|
2022-12-19 02:59:31 +00:00
|
|
|
import sys
|
2015-10-23 12:20:25 +00:00
|
|
|
|
2016-10-31 09:31:56 +00:00
|
|
|
from setuptools import setup, Extension
|
2015-01-04 13:54:25 +00:00
|
|
|
|
2015-04-02 22:01:05 +00:00
|
|
|
|
2022-12-19 02:59:31 +00:00
|
|
|
def _open(filename):
|
|
|
|
if sys.version_info[0] == 2:
|
|
|
|
return open(filename)
|
|
|
|
return open(filename, encoding="utf-8")
|
|
|
|
|
|
|
|
|
2016-11-02 22:06:14 +00:00
|
|
|
# Defining setup variables:
|
2017-08-08 16:27:33 +00:00
|
|
|
defined_macros = dict()
|
2021-10-01 00:24:53 +00:00
|
|
|
defined_macros["CYTHON_CLINE_IN_TRACEBACK"] = 0
|
2016-11-02 22:06:14 +00:00
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting description:
|
2022-12-19 02:59:31 +00:00
|
|
|
with _open("README.rst") as readme_file:
|
2020-07-11 17:18:52 +00:00
|
|
|
description = readme_file.read()
|
2015-01-05 09:11:21 +00:00
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting requirements:
|
2022-12-19 02:59:31 +00:00
|
|
|
with _open("requirements.txt") as requirements_file:
|
2016-12-04 11:13:29 +00:00
|
|
|
requirements = requirements_file.readlines()
|
2015-01-04 13:54:25 +00:00
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting version:
|
2022-12-19 02:59:31 +00:00
|
|
|
with _open("src/dependency_injector/__init__.py") as init_file:
|
2021-10-01 00:24:53 +00:00
|
|
|
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:
|
2021-10-01 00:24:53 +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
|
|
|
|
2021-10-01 00:24:53 +00:00
|
|
|
setup(name="dependency-injector",
|
2015-04-03 13:11:05 +00:00
|
|
|
version=version,
|
2021-10-01 00:24:53 +00:00
|
|
|
description="Dependency injection framework for Python",
|
2015-04-03 13:11:05 +00:00
|
|
|
long_description=description,
|
2021-10-01 00:24:53 +00: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 01:01:33 +00:00
|
|
|
packages=[
|
2021-10-01 00:24:53 +00:00
|
|
|
"dependency_injector",
|
|
|
|
"dependency_injector.ext",
|
2020-06-25 01:01:33 +00:00
|
|
|
],
|
2016-11-02 20:58:30 +00:00
|
|
|
package_dir={
|
2021-10-01 00:24:53 +00:00
|
|
|
"": "src",
|
2016-11-02 20:58:30 +00:00
|
|
|
},
|
2020-06-25 01:01:33 +00:00
|
|
|
package_data={
|
2021-10-01 00:24:53 +00:00
|
|
|
"dependency_injector": ["*.pxd", "*.pyi", "py.typed"],
|
2020-06-25 01:01:33 +00:00
|
|
|
},
|
2016-10-31 09:31:56 +00:00
|
|
|
ext_modules=[
|
2021-10-01 00:24:53 +00:00
|
|
|
Extension("dependency_injector.containers",
|
|
|
|
["src/dependency_injector/containers.c"],
|
2017-08-08 16:27:33 +00:00
|
|
|
define_macros=list(defined_macros.items()),
|
2021-10-01 00:24:53 +00:00
|
|
|
extra_compile_args=["-O2"]),
|
|
|
|
Extension("dependency_injector.providers",
|
|
|
|
["src/dependency_injector/providers.c"],
|
2017-08-08 16:27:33 +00:00
|
|
|
define_macros=list(defined_macros.items()),
|
2021-10-01 00:24:53 +00:00
|
|
|
extra_compile_args=["-O2"]),
|
2022-03-28 02:20:05 +00:00
|
|
|
Extension("dependency_injector._cwiring",
|
|
|
|
["src/dependency_injector/_cwiring.c"],
|
|
|
|
define_macros=list(defined_macros.items()),
|
|
|
|
extra_compile_args=["-O2"]),
|
2016-10-31 09:31:56 +00:00
|
|
|
],
|
2020-06-25 01:01:33 +00:00
|
|
|
install_requires=requirements,
|
|
|
|
extras_require={
|
2021-10-01 00:24:53 +00:00
|
|
|
"yaml": [
|
|
|
|
"pyyaml",
|
2020-06-25 01:01:33 +00:00
|
|
|
],
|
2021-10-01 00:24:53 +00:00
|
|
|
"pydantic": [
|
|
|
|
"pydantic",
|
2021-02-03 14:21:32 +00:00
|
|
|
],
|
2021-10-01 00:24:53 +00:00
|
|
|
"flask": [
|
|
|
|
"flask",
|
2020-07-11 16:15:00 +00:00
|
|
|
],
|
2021-10-01 00:24:53 +00:00
|
|
|
"aiohttp": [
|
|
|
|
"aiohttp",
|
2020-07-28 23:19:05 +00:00
|
|
|
],
|
2016-11-02 22:56:30 +00:00
|
|
|
},
|
2015-04-03 13:11:05 +00:00
|
|
|
zip_safe=True,
|
2021-10-01 00:24:53 +00:00
|
|
|
license="BSD New",
|
|
|
|
platforms=["any"],
|
2015-04-03 13:21:42 +00:00
|
|
|
keywords=[
|
2021-10-01 00:24:53 +00:00
|
|
|
"Dependency injection",
|
|
|
|
"DI",
|
|
|
|
"Inversion of Control",
|
|
|
|
"IoC",
|
|
|
|
"Factory",
|
|
|
|
"Singleton",
|
|
|
|
"Design patterns",
|
|
|
|
"Flask",
|
2015-04-03 13:21:42 +00:00
|
|
|
],
|
2015-04-03 13:11:05 +00:00
|
|
|
classifiers=[
|
2021-10-01 00:24:53 +00:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"License :: OSI Approved :: BSD License",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"Programming Language :: Python :: 3.7",
|
|
|
|
"Programming Language :: Python :: 3.8",
|
|
|
|
"Programming Language :: Python :: 3.9",
|
2021-10-20 16:10:05 +00:00
|
|
|
"Programming Language :: Python :: 3.10",
|
2022-12-19 02:09:14 +00:00
|
|
|
"Programming Language :: Python :: 3.11",
|
2024-08-07 02:41:24 +00:00
|
|
|
"Programming Language :: Python :: 3.12",
|
2024-11-04 05:01:28 +00:00
|
|
|
"Programming Language :: Python :: 3.13",
|
2021-10-01 00:24:53 +00: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 13:11:05 +00:00
|
|
|
])
|