Skip to content

Commit d736b8d

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

File tree

4 files changed

+59
-8
lines changed

4 files changed

+59
-8
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 = "[email protected]"}]
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.py

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

0 commit comments

Comments
 (0)