Skip to content
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

setuptools_scm >= 7 generates wheel version 0.0 #745

Closed
Nothing4You opened this issue Jul 10, 2022 · 6 comments
Closed

setuptools_scm >= 7 generates wheel version 0.0 #745

Nothing4You opened this issue Jul 10, 2022 · 6 comments

Comments

@Nothing4You
Copy link

Hi,

I've been looking into updating aiomysql to setuptools_scm version 7.

In setuptools_scm < 7 both built sdist and wheel files are generated with the correct version in the file name:
https://github.com/Nothing4You/aiomysql/runs/7272226544?check_suite_focus=true#step:10:254

Attempting to update to setuptools_scm >= 7.0.4 produces a wheel file name using version 0.0:
Nothing4You/aiomysql@65e0caf
https://github.com/Nothing4You/aiomysql/runs/7272253138?check_suite_focus=true#step:10:258

For the generated sdist, the egg-info correctly includes Version: 0.1.2.dev19+g65e0caf and an appropriate generated scm version file.

For the generated wheel, the file is named aiomysql-0.0-py3-none-any.whl, egg-info contains Version: 0.0 and the generated version file says 0.0 as well.

I haven't been able to build a minimal reproducible example, as those have been generating the correct versions in my attempts.
I can reproduce it by taking the repo checked out at the commit linked above and running e.g. python -m build on it:

git clone -b scmtest https://github.com/Nothing4You/aiomysql/
cd aiomysql
python -m venv --upgrade-deps venv
. venv/bin/activate
pip install build
python -m build

Successfully built aiomysql-0.1.2.dev19+g65e0caf.tar.gz and aiomysql-0.0-py3-none-any.whl

@Nothing4You
Copy link
Author

Individually generating only wheel or only sdist produces the correct version output.

@RonnyPfannschmidt
Copy link
Contributor

@Nothing4You this seems to be a comeback of a git archival support regression,

@RonnyPfannschmidt
Copy link
Contributor

the full isuse is that by going vcs -> sdist -> wheel, the issue triggers in the sdist, and a git archival is missparsed,
gonna try if i can create a quick bugfix

@Nothing4You
Copy link
Author

thanks, appreciate the quick response.
i've been able to build a minimal reproduction example now, i forgot to actually commit relevant files before: https://github.com/Nothing4You/sscm-745

@Nothing4You
Copy link
Author

Nothing4You commented Jul 10, 2022

thank you for the fix.

for my understanding, are the UserWarnings expected currently or is that a separate issue?

@RonnyPfannschmidt
Copy link
Contributor

Warning is intended

dvzrv added a commit to dvzrv/aiomysql that referenced this issue Nov 18, 2022
pyproject.toml:
Increase the build-system requirements of setuptools-scm to >= 7.0.5,
which obsoletes setuptools-scm-git-archive.
Issues around the use of setuptools-scm as discussed in
aio-libs#809 and
pypa/setuptools-scm#745
have been fixed in
pypa/setuptools-scm@b7c0d0d
and relesed with
https://github.com/pypa/setuptools_scm/releases/tag/v7.0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants