Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
Update the project configuration to use a pyproject.toml file instead of
setup.py. This is the preferred tool and will allow easier integration
with other tools in the future. We can also get rid of MANIFEST.in as
the cache and compiled files are automatically excluded.

Signed-off-by: Chris Marchbanks <[email protected]>
  • Loading branch information
csmarchbanks committed Jan 13, 2025
1 parent 5926a7c commit 4ba724f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 57 deletions.
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "prometheus_client"
version = "0.22.0"
description = "Python client for the Prometheus monitoring system."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.9"
authors = [
{ name = "The Prometheus Authors", email = "[email protected]" },
]
keywords = [
"prometheus",
"monitoring",
"instrumentation",
"client",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]

[project.optional-dependencies]
twisted = [
"twisted",
]

[project.urls]
Homepage = "https://github.com/prometheus/client_python"
Documentation = "https://prometheus.github.io/client_python/"

[tool.setuptools.package-data]
prometheus_client = ['py.typed']
51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ deps =
flake8-import-order==0.18.2
skip_install = true
commands =
flake8 prometheus_client/ tests/ setup.py
flake8 prometheus_client/ tests/

[testenv:isort]
deps =
isort==5.10.1
skip_install = true
commands =
isort --check prometheus_client/ tests/ setup.py
isort --check prometheus_client/ tests/

[testenv:mypy]
deps =
Expand Down

0 comments on commit 4ba724f

Please sign in to comment.