Skip to content

Commit 1ef5791

Browse files
author
Mathieu Dupuy
committed
migrate setup.cfg to pyproject.toml
1 parent 2bfd949 commit 1ef5791

File tree

5 files changed

+59
-55
lines changed

5 files changed

+59
-55
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ Please write unit tests for your change. There are two kinds of tests:
2828
### Running all tests
2929

3030
```shell
31-
python setup.py test
32-
cd tests/end2end/ && PYTHONPATH=../.. ./manage.py test
31+
tox
3332
```
3433

3534
The former runs the regular unit tests, the latter runs the Django
3635
unit test.
3736

38-
To avoid setting PYTHONPATH every time, you can also run `python
39-
setup.py install`.
37+
To avoid setting PYTHONPATH every time, you can also run `pip install
38+
-e .`
4039

4140
### Running the test Django app
4241

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pip install django-prometheus
3636
Or, if you're using a development version cloned from this repository:
3737

3838
```shell
39-
python path-to-where-you-cloned-django-prometheus/setup.py install
39+
pip install -e path-to-where-you-cloned-django-prometheus/setup.py
4040
```
4141

4242
This will install [prometheus_client](https://github.com/prometheus/client_python) as a dependency.

pyproject.toml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
[project]
2+
name = "django-prometheus"
3+
authors = [{name = "Uriel Corfa", email = "uriel@corfa.fr"}]
4+
license = {text = "Apache"}
5+
description = "Django middlewares to monitor your application with Prometheus.io."
6+
keywords = ["django", "monitoring", "prometheus"]
7+
classifiers = [
8+
"Development Status :: 5 - Production/Stable",
9+
"Intended Audience :: Developers",
10+
"Intended Audience :: Information Technology",
11+
"Intended Audience :: System Administrators",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.7",
14+
"Programming Language :: Python :: 3.8",
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Framework :: Django :: 3.2",
19+
"Framework :: Django :: 4.0",
20+
"Framework :: Django :: 4.1",
21+
"Framework :: Django :: 4.2",
22+
"Topic :: System :: Monitoring",
23+
"License :: OSI Approved :: Apache Software License",
24+
]
25+
dependencies = ["prometheus-client>=0.7"]
26+
dynamic = ["version"]
27+
28+
[project.readme]
29+
file = "README.md"
30+
content-type = "text/markdown"
31+
32+
[project.urls]
33+
Homepage = "https://github.com/korfuri/django-prometheus"
34+
Changelog = "https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md"
35+
Documentation = "https://github.com/korfuri/django-prometheus/blob/master/README.md"
36+
Source = "https://github.com/korfuri/django-prometheus"
37+
Tracker = "https://github.com/korfuri/django-prometheus/issues"
38+
39+
[project.optional-dependencies]
40+
testing = ["pytest", "pytest-django"]
41+
42+
[tool.setuptools]
43+
test-suite = "django_prometheus.tests"
44+
include-package-data = false
45+
46+
[tool.setuptools.packages.find]
47+
exclude = ["tests"]
48+
namespaces = false
49+
50+
[tool.setuptools.dynamic]
51+
version = {attr = "django_prometheus.__version__"}
52+
53+
[tool.aliases]
54+
test = "pytest"
55+
156
[build-system]
257
requires = [ "setuptools >= 67.7.2", "wheel >= 0.40.0"]
358
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,3 @@
1-
[metadata]
2-
name = django-prometheus
3-
version = attr: django_prometheus.__version__
4-
author = Uriel Corfa
5-
author_email = uriel@corfa.fr
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-
45-
[aliases]
46-
test=pytest
47-
481
[pycodestyle]
492
max-line-length = 110
503

setup.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)