Skip to content

Commit 58fca18

Browse files
dimblebyindygreg
authored andcommitted
build: use static dependency metadata
Closes #256.
1 parent fd95536 commit 58fca18

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,21 @@ classifiers = [
2121
"Programming Language :: Python :: 3.14",
2222
]
2323
keywords = ["zstandard", "zstd", "compression"]
24+
dependencies = []
25+
26+
[project.optional-dependencies]
27+
cffi = [
28+
'cffi>=1.11 ; python_version < "3.13" and platform_python_implementation != "PyPy"',
29+
'cffi>=1.17 ; python_version >= "3.13" and platform_python_implementation != "PyPy"',
30+
]
2431

2532
[project.urls]
2633
Homepage = "https://github.com/indygreg/python-zstandard"
2734
Documentation = "https://python-zstandard.readthedocs.io/en/latest/"
2835

2936
[build-system]
3037
requires = [
31-
"cffi>=1.17.0",
38+
"cffi>=1.17.0 ; platform_python_implementation != 'PyPy'",
3239
"packaging",
3340
"setuptools",
3441
]

setup.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,5 @@
158158
ext_modules=extensions,
159159
cmdclass={"build_ext": setup_zstd.RustBuildExt},
160160
test_suite="tests",
161-
install_requires=[
162-
# cffi is required on PyPy.
163-
"cffi>=%s; platform_python_implementation == 'PyPy'"
164-
% MINIMUM_CFFI_VERSION
165-
],
166-
extras_require={
167-
"cffi": ["cffi>=%s" % MINIMUM_CFFI_VERSION],
168-
},
169161
tests_require=["hypothesis"],
170162
)

0 commit comments

Comments
 (0)