Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate setup.py to pyproject.toml #417

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ Please write unit tests for your change. There are two kinds of tests:
### Running all tests

```shell
python setup.py test
cd tests/end2end/ && PYTHONPATH=../.. ./manage.py test
tox
```

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

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

### Running the test Django app

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pip install django-prometheus
Or, if you're using a development version cloned from this repository:

```shell
python path-to-where-you-cloned-django-prometheus/setup.py install
pip install -e path-to-where-you-cloned-django-prometheus/setup.py
```

This will install [prometheus_client](https://github.com/prometheus/client_python) as a dependency.
Expand Down
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
[project]
name = "django-prometheus"
authors = [{name = "Uriel Corfa", email = "uriel@corfa.fr"}]
license = {text = "Apache"}
description = "Django middlewares to monitor your application with Prometheus.io."
keywords = ["django", "monitoring", "prometheus"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Programming Language :: Python :: 3",
"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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",

"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Framework :: Django :: 4.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",

"Topic :: System :: Monitoring",
"License :: OSI Approved :: Apache Software License",
]
dependencies = ["prometheus-client>=0.7"]
dynamic = ["version"]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
Homepage = "https://github.com/korfuri/django-prometheus"
Changelog = "https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md"
Documentation = "https://github.com/korfuri/django-prometheus/blob/master/README.md"
Source = "https://github.com/korfuri/django-prometheus"
Tracker = "https://github.com/korfuri/django-prometheus/issues"

[project.optional-dependencies]
testing = ["pytest", "pytest-django"]

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
exclude = ["tests"]
namespaces = false

[tool.setuptools.dynamic]
version = {attr = "django_prometheus.__version__"}

[build-system]
requires = [ "setuptools >= 67.7.2", "wheel >= 0.40.0"]
build-backend = "setuptools.build_meta"
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[aliases]
test=pytest

[pycodestyle]
max-line-length = 110

Expand Down
66 changes: 0 additions & 66 deletions setup.py

This file was deleted.