Repository navigation
fix: Use PEP-621 compliant dependencies spec - #265
zach-overflow wants to merge 3 commits into
Conversation
|
I agree with the changes, and it's a great start here. One issue is that including setup.py and pyproject.toml is having two avenues to do the same thing. I want to suggest completely removing the setup.py (deprecated) install mechanism and completely using the pyproject.toml. |
@vsoch I'm happy to do that and agree. I considered making that broader change first, but opted for the smaller scope just in case there was some legacy reason I wasn't aware of for the use of |
6256604 to
f6f4dce
Compare
Signed-off-by: Zach <4951117+zach-overflow@users.noreply.github.com>
Signed-off-by: Zach <4951117+zach-overflow@users.noreply.github.com>
f6f4dce to
cda353a
Compare
|
@vsoch I've consolidated to |
|
This looks great! One small note. Using |
Signed-off-by: Zach <4951117+zach-overflow@users.noreply.github.com>
283868c to
bda8dba
Compare
@vsoch good call. I've made that update. Should be ready for another review 👍 |
What?
oras/version.pytopyproject.toml.version.pyconstantpyproject.tomllocationINSTALL_REQUIRES[project].dependenciesTESTS_REQUIRES[dependency-groups].testsDOCKER_REQUIRES[project.optional-dependencies].dockerECR_REQUIRES[project.optional-dependencies].ecrINSTALL_REQUIRES_ALL[project.optional-dependencies].allsetup.pyentirely. All package metadata (description, authors, license, keywords, classifiers, URLs) is declared statically in[project]; the version is still read fromoras/version.pyvia[tool.setuptools.dynamic].AUTHOR,EMAIL,DESCRIPTION, etc.) fromoras/version.py.Apache-2.0), which requiressetuptools>=77and replaces theLicense ::classifier.requires-python = ">=3.9"and updates the version classifiers to 3.9–3.13, sincesetuptools>=77requires Python 3.9+.setup.cfgto.flake8, so no setuptools config files remain.python -m buildinstead ofpython setup.py sdist bdist_wheel.Why?
testsdependencies extras from being published in the PyPI package. This fixes the current problem where users who runpip install oras-py[all]are forced to installpytestand other test-only requirements in their venv, which is very unlikely what they wanted.oras/version.pyis non-standard, and makes it harder to use in some developement environments.oras[all]forces clients to install oras' test dependencies #267pyproject.tomldependency standards might improve weird package manager quirks like the one described in Pip resolution-too-deep error related to the lack of semver requirements on dependencies jsonschema and requests #209Testing
Packaging metadata matches
mainapart from the intended dependency changes:Expected diff:
pytest(and the redundantjsonschema/requests) removed from theallextra, thetestsextra removed, allDynamic:lines removed,Home-pagereplaced byProject-URL: Homepage,Author/Author-emailmerged intoAuthor-email: Vanessa Sochat <...>, andLicense: LICENSE+ theLicense ::classifier replaced byLicense-Expression: Apache-2.0,Requires-Python: >=3.9added, and thePython :: 3.7classifier replaced by 3.9–3.13. The wheel's file list is unchanged.Test suite, installing test dependencies from the new
testsdependency group:Lint:
make develop && make lint