Skip to content

Commit 2bfd949

Browse files
author
Mathieu Dupuy
committed
migrate setup.py to setup.cfg
1 parent bea7696 commit 2bfd949

File tree

2 files changed

+46
-65
lines changed

2 files changed

+46
-65
lines changed

setup.cfg

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
[metadata]
2+
name = django-prometheus
3+
version = attr: django_prometheus.__version__
4+
author = Uriel Corfa
5+
author_email = [email protected]
6+
license = Apache
7+
description = Django middlewares to monitor your application with Prometheus.io.
8+
keywords = django, monitoring, prometheus
9+
url = http://github.com/korfuri/django-prometheus
10+
long_description = file: README.md
11+
long_description_content_type = text/markdown
12+
classifiers =
13+
Development Status :: 5 - Production/Stable
14+
Intended Audience :: Developers
15+
Intended Audience :: Information Technology
16+
Intended Audience :: System Administrators
17+
Programming Language :: Python :: 3
18+
Programming Language :: Python :: 3.7
19+
Programming Language :: Python :: 3.8
20+
Programming Language :: Python :: 3.9
21+
Programming Language :: Python :: 3.10
22+
Programming Language :: Python :: 3.11
23+
Framework :: Django :: 3.2
24+
Framework :: Django :: 4.0
25+
Framework :: Django :: 4.1
26+
Framework :: Django :: 4.2
27+
Topic :: System :: Monitoring
28+
License :: OSI Approved :: Apache Software License
29+
project_urls =
30+
Changelog = https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md
31+
Documentation = https://github.com/korfuri/django-prometheus/blob/master/README.md
32+
Source = https://github.com/korfuri/django-prometheus
33+
Tracker = https://github.com/korfuri/django-prometheus/issues
34+
35+
[options]
36+
packages = find:
37+
setup_requires = pytest-runner
38+
install_requires = prometheus-client>=0.7
39+
test_suite = django_prometheus.tests
40+
tests_require = pytest; pytest-django
41+
42+
[options.packages.find]
43+
exclude = tests
44+
145
[aliases]
246
test=pytest
347

setup.py

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,3 @@
1-
import re
1+
from setuptools import setup
22

3-
from setuptools import find_packages, setup
4-
5-
with open("README.md") as fl:
6-
LONG_DESCRIPTION = fl.read()
7-
8-
9-
def get_version():
10-
version_file = open("django_prometheus/__init__.py", "r").read()
11-
version_match = re.search(
12-
r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE
13-
)
14-
if version_match:
15-
return version_match.group(1)
16-
raise RuntimeError("Unable to find version string.")
17-
18-
19-
setup(
20-
name="django-prometheus",
21-
version=get_version(),
22-
author="Uriel Corfa",
23-
author_email="[email protected]",
24-
description=("Django middlewares to monitor your application with Prometheus.io."),
25-
license="Apache",
26-
keywords="django monitoring prometheus",
27-
url="http://github.com/korfuri/django-prometheus",
28-
project_urls={
29-
"Changelog": "https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md",
30-
"Documentation": "https://github.com/korfuri/django-prometheus/blob/master/README.md",
31-
"Source": "https://github.com/korfuri/django-prometheus",
32-
"Tracker": "https://github.com/korfuri/django-prometheus/issues",
33-
},
34-
packages=find_packages(
35-
exclude=[
36-
"tests",
37-
]
38-
),
39-
test_suite="django_prometheus.tests",
40-
long_description=LONG_DESCRIPTION,
41-
long_description_content_type="text/markdown",
42-
tests_require=["pytest", "pytest-django"],
43-
setup_requires=["pytest-runner"],
44-
options={"bdist_wheel": {"universal": "1"}},
45-
install_requires=[
46-
"prometheus-client>=0.7",
47-
],
48-
classifiers=[
49-
"Development Status :: 5 - Production/Stable",
50-
"Intended Audience :: Developers",
51-
"Intended Audience :: Information Technology",
52-
"Intended Audience :: System Administrators",
53-
"Programming Language :: Python :: 3",
54-
"Programming Language :: Python :: 3.7",
55-
"Programming Language :: Python :: 3.8",
56-
"Programming Language :: Python :: 3.9",
57-
"Programming Language :: Python :: 3.10",
58-
"Programming Language :: Python :: 3.11",
59-
"Framework :: Django :: 3.2",
60-
"Framework :: Django :: 4.0",
61-
"Framework :: Django :: 4.1",
62-
"Framework :: Django :: 4.2",
63-
"Topic :: System :: Monitoring",
64-
"License :: OSI Approved :: Apache Software License",
65-
],
66-
)
3+
setup()

0 commit comments

Comments
 (0)