Skip to content

Commit b0a6f12

Browse files
authored
Migrate from setup.py to pyproject.toml (#1084)
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 <csmarchbanks@gmail.com>
1 parent ecf344b commit b0a6f12

File tree

4 files changed

+51
-57
lines changed

4 files changed

+51
-57
lines changed

MANIFEST.in

-4
This file was deleted.

pyproject.toml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "prometheus_client"
7+
version = "0.21.1"
8+
description = "Python client for the Prometheus monitoring system."
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
requires-python = ">=3.9"
12+
authors = [
13+
{ name = "The Prometheus Authors", email = "prometheus-developers@googlegroups.com" },
14+
]
15+
keywords = [
16+
"prometheus",
17+
"monitoring",
18+
"instrumentation",
19+
"client",
20+
]
21+
classifiers = [
22+
"Development Status :: 4 - Beta",
23+
"Intended Audience :: Developers",
24+
"Intended Audience :: Information Technology",
25+
"Intended Audience :: System Administrators",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
33+
"Programming Language :: Python :: Implementation :: CPython",
34+
"Programming Language :: Python :: Implementation :: PyPy",
35+
"Topic :: System :: Monitoring",
36+
"License :: OSI Approved :: Apache Software License",
37+
]
38+
39+
[project.optional-dependencies]
40+
twisted = [
41+
"twisted",
42+
]
43+
44+
[project.urls]
45+
Homepage = "https://github.com/prometheus/client_python"
46+
Documentation = "https://prometheus.github.io/client_python/"
47+
48+
[tool.setuptools.package-data]
49+
prometheus_client = ['py.typed']

setup.py

-51
This file was deleted.

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ deps =
3434
flake8-import-order==0.18.2
3535
skip_install = true
3636
commands =
37-
flake8 prometheus_client/ tests/ setup.py
37+
flake8 prometheus_client/ tests/
3838

3939
[testenv:isort]
4040
deps =
4141
isort==5.10.1
4242
skip_install = true
4343
commands =
44-
isort --check prometheus_client/ tests/ setup.py
44+
isort --check prometheus_client/ tests/
4545

4646
[testenv:mypy]
4747
deps =

0 commit comments

Comments
 (0)