ENH: Allow versioneer to be used as a module in PEP-518 mode#294
ENH: Allow versioneer to be used as a module in PEP-518 mode#294effigies merged 6 commits intopython-versioneer:masterpython-versioneer/python-versioneer:masterfrom effigies:enh/pep518-modeeffigies/python-versioneer:enh/pep518-modeCopy head branch name to clipboard
Conversation
|
The only thing the versioneer-518 does is package the vendored code. It would be nice if the get_version call was available for use even if the code had not been vendored. At the time of writing development on versioneer had stalled and my 518 version seemed necessary. Now I agree that exposing the methods seems like the best route and would probably allow for some cleanup of the implementation. |
I think that is sometimes the case, which leads some projects to add |
|
@jwodder - would you be so kind to provide a review on this PR? My foo in Python build/dist/*-utils and corresponding PEPs is not that strong so can't really assess possible implications. |
7ce197a to
062f329
Compare
|
After letting this rest for a bit, I tried using it on a new repository and found this wasn't as ready as I remembered. Got around to adding Will rebase and update the docs after #311. |
b2d96ef to
12b784e
Compare
|
I think we might want to consider the CLI a bit before pushing this out. Right now the installation process is: versioneer install # Vendors versioneer then runs setup
python versioneer.py setup # Rerun setup from vendored versioneerI'm currently proposing that this be possible to replace with versioneer install # Vendors versioneer then runs setup
versioneer install --vendor # Same as default
versioneer install --no-vendor # Non-vendored setupI will push this soon, but adding a comment to explain my reasoning. |
347cca3 to
92c5219
Compare
|
Took a break to come back to this with fresh eyes. On the whole, I'm happy with it. Would anybody be interested in reviewing and/or test-driving? @bucknerns @yarikoptic? |
Access setup without vendoring by running `versioneer install --no-vendor`
389c45c to
0337a75
Compare
|
I'm checking it out |
|
@bucknerns FWIW I currently have to do this to get [build-system]
requires = [
"setuptools",
"versioneer @ file:///data/projects/versioneer/",
"wheel"
]
build-backend = "setuptools.build_meta"Once there's a release, it shouldn't be necessary. And I think |
Perhaps removes the PEP517/518 dependency that python -m build pulls in and messes up versioneer and is pending fixing with python-versioneer/python-versioneer#294
@bucknerns Any news? |
|
Looks good, I pushed a copy to test.pypi.org and added to a pyproject.toml and did a |
|
fyi had to version lock it in the pyproject.toml but should be good on official version "versioneer==0.24.dev0" |
|
Awesome! Thanks for the review. I'll merge now. I can write some release notes and pushing 0.24 to PyPI today or tomorrow, but feel free to go ahead and do it yourself. |
Perhaps removes the PEP517/518 dependency that python -m build pulls in and messes up versioneer and is pending fixing with python-versioneer/python-versioneer#294
Perhaps removes the PEP517/518 dependency that python -m build pulls in and messes up versioneer and is pending fixing with python-versioneer/python-versioneer#294
As https://github.com/python-versioneer/versioneer-518 proves, the only thing preventing versioneer to be used in a non-vendored fashion and consistent with PEP-518 is making the variables available in the vendored module available via
import versioneer.This will not prevent vendored installations but may lead to silent interference. I also haven't added a non-vendored
versioneer setupcommand, as I haven't evaluated what all the vendored version does that would be useful in a non-vendored context.Others' thoughts would be welcome (@bucknerns?).
Closes #193.