-
Notifications
You must be signed in to change notification settings - Fork 901
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
Introduced pyproject.toml and moved static metadata from setup.py #1592
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include README.md | ||
include LICENSE.txt | ||
emasab marked this conversation as resolved.
Show resolved
Hide resolved
|
||
include test-requirements.txt | ||
include src/confluent_kafka/src/*.[ch] | ||
prune tests | ||
prune docs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ all: | |
|
||
|
||
clean: | ||
python setup.py clean | ||
pip cache purge | ||
rm -rf dist | ||
make -C docs clean | ||
|
||
.PHONY: docs | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,41 @@ | ||||||||||||||||||||
[build-system] | ||||||||||||||||||||
requires = [ "setuptools>=62", "wheel"] | ||||||||||||||||||||
build-backend = "setuptools.build_meta" | ||||||||||||||||||||
|
||||||||||||||||||||
[project] | ||||||||||||||||||||
name = "confluent-kafka" | ||||||||||||||||||||
version = "2.6.0.post1.dev1" | ||||||||||||||||||||
description = "Confluent's Python client for Apache Kafka" | ||||||||||||||||||||
classifiers = [ | ||||||||||||||||||||
"Development Status :: 5 - Production/Stable", | ||||||||||||||||||||
"Intended Audience :: Developers", | ||||||||||||||||||||
"License :: OSI Approved :: Apache Software License", | ||||||||||||||||||||
"Programming Language :: Python", | ||||||||||||||||||||
"Programming Language :: Python :: 3", | ||||||||||||||||||||
"Topic :: Software Development :: Libraries :: Python Modules"] | ||||||||||||||||||||
readme = "README.md" | ||||||||||||||||||||
license = { file = "LICENSE" } | ||||||||||||||||||||
requires-python = ">=3.7" | ||||||||||||||||||||
dynamic = ["optional-dependencies","dependencies"] | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit:
Suggested change
|
||||||||||||||||||||
|
||||||||||||||||||||
[[project.authors]] | ||||||||||||||||||||
name = "Confluent Inc." | ||||||||||||||||||||
email = "support@confluent.io" | ||||||||||||||||||||
|
||||||||||||||||||||
[project.urls] | ||||||||||||||||||||
Homepage = "https://github.com/confluentinc/confluent-kafka-python" | ||||||||||||||||||||
|
||||||||||||||||||||
[tool.setuptools] | ||||||||||||||||||||
include-package-data = false | ||||||||||||||||||||
|
||||||||||||||||||||
[tool.setuptools.dynamic] | ||||||||||||||||||||
dependencies = {file = ["requirements/requirements.txt"]} | ||||||||||||||||||||
optional-dependencies.schemaregistry = { file = ["requirements/requirements-schemaregistry.txt"] } | ||||||||||||||||||||
optional-dependencies.avro = { file = ["requirements/requirements-avro.txt", "requirements/requirements-schemaregistry.txt"] } | ||||||||||||||||||||
optional-dependencies.json = { file = ["requirements/requirements-json.txt", "requirements/requirements-schemaregistry.txt"] } | ||||||||||||||||||||
optional-dependencies.protobuf = { file = ["requirements/requirements-protobuf.txt", "requirements/requirements-schemaregistry.txt"] } | ||||||||||||||||||||
optional-dependencies.dev = { file = ["requirements/requirements-tests.txt", "requirements/requirements-docs.txt", "requirements/requirements-examples.txt"] } | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add the SR dependencies to dev (for testing) and break these long lines.
Suggested change
|
||||||||||||||||||||
optional-dependencies.docs = { file = ["requirements/requirements-docs.txt"] } | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For generating docs Sphinx needs also the SR dependencies.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an
|
||||||||||||||||||||
optional-dependencies.tests = { file = ["requirements/requirements-tests.txt"] } | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the SR dependencies here
Suggested change
|
||||||||||||||||||||
optional-dependencies.examples = { file = ["requirements/requirements-examples.txt"] } | ||||||||||||||||||||
optional-dependencies.soaktest = { file = ["requirements/requirements-soaktest.txt"] } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-r requirements.txt | ||
-r requirements-schemaregistry.txt | ||
-r requirements-avro.txt | ||
-r requirements-protobuf.txt | ||
-r requirements-json.txt | ||
-r requirements-examples.txt | ||
-r requirements-tests.txt | ||
-r requirements-docs.txt | ||
-r requirements-soaktest.txt |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,3 @@ | ||||||||
fastavro>=0.23.0 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem with fastavro and 3.7 in versions higher than 1.8.0, but maybe it's been fixed in 1.8.1
Suggested change
|
||||||||
requests | ||||||||
avro>=1.11.1,<2 | ||||||||
avro>=1.11.1,<2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyrsistent | ||
jsonschema |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
protobuf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,14 +1,17 @@ | ||||||
# core test requirements | ||||||
urllib3<2.0.0;python_version<="3.7" | ||||||
urllib3 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
flake8 | ||||||
pytest==4.6.9;python_version<="3.0" | ||||||
pytest>=6.0.0;python_version>="3.0" | ||||||
pytest | ||||||
pytest-timeout | ||||||
requests-mock | ||||||
trivup>=0.8.3 | ||||||
|
||||||
# other requirements | ||||||
fastavro<1.8.0;python_version=="3.7" | ||||||
fastavro>=1.8.4;python_version>"3.7" | ||||||
fastavro | ||||||
requests | ||||||
avro>=1.11.1,<2 | ||||||
jsonschema | ||||||
protobuf | ||||||
protobuf>=3.6.0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These dependencies would be duplicate, please remove them and add a
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -18,9 +18,8 @@ A python3 env suitable for running tests: | |||||||
|
||||||||
$ python3 -m venv venv_test | ||||||||
$ source venv_test/bin/activate | ||||||||
$ pip install -r tests/requirements.txt | ||||||||
$ python setup.py build | ||||||||
$ python setup.py install | ||||||||
$ pip install -r requirements/requirements-tests.txt | ||||||||
$ python3 -m pip install . | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
When you're finished with it: | ||||||||
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.