Skip to content

Commit 31e3de0

Browse files
authored
Updates to pyproject.toml; drop setup.py (#3033)
1 parent 2b7d35c commit 31e3de0

5 files changed

Lines changed: 21 additions & 16 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ test-coverage: build-integration
4747
# Check the readme for syntax errors, which can lead to invalid formatting on
4848
# PyPi homepage (https://pypi.python.org/pypi/kafka-python)
4949
check-readme:
50-
python setup.py check -rms
50+
uv build
51+
uvx twine check --strict dist/*
5152

5253
clean:
5354
rm -rf `find . -name __pycache__`

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Kafka Python client
1414
.. image:: https://img.shields.io/pypi/v/kafka-python.svg
1515
:target: https://pypi.org/project/kafka-python
1616
.. image:: https://img.shields.io/pypi/implementation/kafka-python
17-
:target: https://github.com/dpkp/kafka-python/blob/master/setup.py
17+
:target: https://github.com/dpkp/kafka-python/blob/master/pyproject.toml
1818

1919

2020

pyproject.toml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=61.2"]
2+
requires = ["setuptools>=77.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -9,10 +9,12 @@ authors = [{name = "Dana Powers", email = "dana.powers@gmail.com"}]
99
description = "Pure Python client for Apache Kafka"
1010
keywords = ["apache kafka", "kafka"]
1111
readme = "README.rst"
12+
license = "Apache-2.0"
13+
license-files = ["LICENSE"]
14+
requires-python = ">=3.8"
1215
classifiers = [
1316
"Development Status :: 5 - Production/Stable",
1417
"Intended Audience :: Developers",
15-
"License :: OSI Approved :: Apache Software License",
1618
"Programming Language :: Python",
1719
"Programming Language :: Python :: 3",
1820
"Programming Language :: Python :: 3.8",
@@ -26,7 +28,13 @@ classifiers = [
2628
"Programming Language :: Python :: Implementation :: PyPy",
2729
"Topic :: Software Development :: Libraries :: Python Modules",
2830
]
29-
urls = {Homepage = "https://github.com/dpkp/kafka-python"}
31+
32+
[project.urls]
33+
Homepage = "https://github.com/dpkp/kafka-python"
34+
Documentation = "https://kafka-python.readthedocs.io"
35+
Repository = "https://github.com/dpkp/kafka-python"
36+
Issues = "https://github.com/dpkp/kafka-python/issues"
37+
Changelog = "https://github.com/dpkp/kafka-python/blob/master/CHANGES.md"
3038

3139
[project.optional-dependencies]
3240
crc32c = ["crc32c"]
@@ -38,7 +46,6 @@ benchmarks = ["pyperf"]
3846

3947
[tool.setuptools]
4048
include-package-data = false
41-
license-files = [] # workaround for https://github.com/pypa/setuptools/issues/4759
4249

4350
[tool.setuptools.package-data]
4451
kafka = ["protocol/schemas/resources/*.json", "coordinator/assignors/sticky/*.json", "**/*.pyi"]
@@ -47,8 +54,13 @@ kafka = ["protocol/schemas/resources/*.json", "coordinator/assignors/sticky/*.js
4754
exclude = ["test"]
4855
namespaces = false
4956

57+
[tool.setuptools.dynamic]
58+
version = {attr = "kafka.__version__"}
59+
5060
[tool.pylint.main]
5161
ignore-patterns = '.*\.pyi$'
5262

53-
[tool.setuptools.dynamic]
54-
version = {attr = "kafka.__version__"}
63+
[tool.pytest.ini_options]
64+
log_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(thread)d:%(threadName)s %(name)-23s %(message)s"
65+
log_level = "DEBUG"
66+
addopts = "--durations=10 --timeout=300 --timeout-method=thread"

pytest.ini

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

setup.py

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

0 commit comments

Comments
 (0)