|
1 | 1 | import re
|
2 | 2 | from setuptools import find_packages, setup
|
3 | 3 |
|
4 |
| -LONG_DESCRIPTION = """Django-Prometheus |
| 4 | +with open("README.md") as fl: |
| 5 | + LONG_DESCRIPTION = fl.read() |
5 | 6 |
|
6 |
| -This library contains code to expose some monitoring metrics relevant |
7 |
| -to Django internals so they can be monitored by Prometheus.io. |
8 |
| -
|
9 |
| -See https://github.com/korfuri/django-prometheus for usage |
10 |
| -instructions. |
11 |
| -""" |
12 | 7 |
|
13 | 8 | def get_version():
|
14 |
| - version_file = open('django_prometheus/__init__.py', 'r').read() |
15 |
| - version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE) |
| 9 | + version_file = open("django_prometheus/__init__.py", "r").read() |
| 10 | + version_match = re.search( |
| 11 | + r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE |
| 12 | + ) |
16 | 13 | if version_match:
|
17 | 14 | return version_match.group(1)
|
18 |
| - raise RuntimeError('Unable to find version string.') |
| 15 | + raise RuntimeError("Unable to find version string.") |
| 16 | + |
19 | 17 |
|
20 | 18 | setup(
|
21 | 19 | name="django-prometheus",
|
22 | 20 | version=get_version(),
|
23 | 21 | author="Uriel Corfa",
|
24 | 22 | author_email="uriel@corfa.fr",
|
25 |
| - description=( |
26 |
| - "Django middlewares to monitor your application with Prometheus.io."), |
| 23 | + description=("Django middlewares to monitor your application with Prometheus.io."), |
27 | 24 | license="Apache",
|
28 | 25 | keywords="django monitoring prometheus",
|
29 | 26 | url="http://github.com/korfuri/django-prometheus",
|
30 |
| - packages=find_packages(), |
| 27 | + packages=find_packages(exclude=["tests",]), |
31 | 28 | test_suite="django_prometheus.tests",
|
32 | 29 | long_description=LONG_DESCRIPTION,
|
33 |
| - tests_require=['pytest', 'pytest-django'], |
| 30 | + long_description_content_type="text/markdown", |
| 31 | + tests_require=["pytest", "pytest-django"], |
34 | 32 | setup_requires=["pytest-runner"],
|
35 | 33 | options={"bdist_wheel": {"universal": "1"}},
|
36 |
| - install_requires=[ |
37 |
| - "prometheus-client>=0.7", |
38 |
| - ], |
| 34 | + install_requires=["prometheus-client>=0.7",], |
39 | 35 | classifiers=[
|
40 | 36 | "Development Status :: 5 - Production/Stable",
|
41 | 37 | "Intended Audience :: Developers",
|
|
0 commit comments