-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
76 lines (66 loc) · 2.51 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
import os
import setuptools
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
def _read_reqs(relpath):
fullpath = os.path.join(os.path.dirname(__file__), relpath)
with open(fullpath) as f:
return [s.strip() for s in f.readlines()
if (s.strip() and not s.startswith("#"))]
_REQUIREMENTS_TXT = _read_reqs("requirements.txt")
_TESTS_REQUIREMENTS_TXT = _read_reqs("tests-requirements.txt")
_DEPENDENCY_LINKS = [l for l in _REQUIREMENTS_TXT if "://" in l]
_INSTALL_REQUIRES = [l for l in _REQUIREMENTS_TXT if "://" not in l]
_TEST_REQUIRE = [l for l in _TESTS_REQUIREMENTS_TXT if "://" not in l]
readme_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.md')
try:
from m2r import parse_from_file
readme = parse_from_file(readme_file)
except ImportError:
# m2r may not be installed in user environment
with open(readme_file) as f:
readme = f.read()
setuptools.setup(
name='gourde',
version='0.7.0',
include_package_data=True,
install_requires=_INSTALL_REQUIRES,
extras_require={
'twisted': ['flask-twisted', 'twisted'],
'gunicorn': ['gunicorn'],
},
dependency_links=_DEPENDENCY_LINKS,
tests_require=_TEST_REQUIRE,
entry_points={
'console_scripts': [
'gourde-example = example.app:main',
],
},
packages=setuptools.find_packages(),
# metadata for upload to PyPI
author="Criteo",
long_description=readme,
long_description_content_type='text/markdown',
author_email="sre-observability@criteo.com",
description="Flask(-Twisted) microframework for microservices with Prometheus and Sentry support.",
license="Apache 2",
keywords="flask twisted gunicorn microframework microservice prometheus sentry",
url="https://github.com/criteo/gourde/",
project_urls={
"Source Code": "https://github.com/criteo/gourde/",
},
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
# This makes sure the templates are easy to import.
zip_safe=False,
)