You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My projects have been using setuptools-scm for some time now and have recently started breaking for users installing the sdist .tar.gz now that setuptools-scm 7.x is getting installed. Setuptools-scm seems to be overwriting the produced satpy/version.py when the wheel is built from the sdist during pip install. The wheel ends up with a version of 0.0 in the filename while the metadata in the sdist has 0.36.0. We use setuptools_scm_git_archive to pull the information from git tags.
That's the base environment. Our package has a lot of C-based dependencies so it is easier to install from conda. If we download the most recent version from PyPI and build a wheel from it...
wget "https://files.pythonhosted.org/packages/78/63/fb97b0cc15c43058cc6c2942bd9a1deb89864800d7c5ae048633226fd096/satpy-0.36.0.tar.gz#sha256=f1c201f1d53dfda27856576461079eb9d78531e21ddc055baea20cb47f114107"
tar -xzf satpy-0.36.0.tar.gz
cd satpy-0.36.0
cat satpy/version.py
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '0.36.0'
version_tuple = (0, 36, 0)
python -m build -w .
# ...
Successfully built satpy-0.0-py2.py3-none-any.whl
cat satpy/version.py
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '0.0'
__version_tuple__ = version_tuple = (0, 0)
At first I thought it might be because of the hacky workaround we're using from #190 in our setup.py:
try:
# HACK: https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286
# Stop setuptools_scm from including all repository files
import setuptools_scm.integration
setuptools_scm.integration.find_files = lambda _: []
except ImportError:
pass
but even if I remove that. commit the change, generate an sdist, untar the sdist, and run python -m build -w . for it I still get a wheel version of 0.0.
If I force the version of setuptools_scm in my pyproject.toml to 6.4.2 (the version before 7.x) then it works fine.
Any ideas what I'm missing?
The text was updated successfully, but these errors were encountered:
Ah looks like that fix hasn't been released yet. This looks like it is fixed when I install from github and run the command line version:
pip install git+https://github.com/pypa/setuptools_scm.git
python -m setuptools_scm
/home/davidh/miniconda3/envs/test_satpy_version/lib/python3.9/site-packages/setuptools_scm/git.py:284: UserWarning: git archive did not support describe output
warnings.warn("git archive did not support describe output")
0.36.1
And it left the satpy/version.py as it was. I'll close this for now and wait for the next release.
My projects have been using setuptools-scm for some time now and have recently started breaking for users installing the sdist
.tar.gz
now thatsetuptools-scm
7.x is getting installed. Setuptools-scm seems to be overwriting the producedsatpy/version.py
when the wheel is built from the sdist duringpip install
. The wheel ends up with a version of 0.0 in the filename while the metadata in the sdist has 0.36.0. We usesetuptools_scm_git_archive
to pull the information from git tags.Here is how I'm reproducing it:
That's the base environment. Our package has a lot of C-based dependencies so it is easier to install from conda. If we download the most recent version from PyPI and build a wheel from it...
At first I thought it might be because of the hacky workaround we're using from #190 in our
setup.py
:but even if I remove that. commit the change, generate an sdist, untar the sdist, and run
python -m build -w .
for it I still get a wheel version of 0.0.If I force the version of
setuptools_scm
in mypyproject.toml
to 6.4.2 (the version before 7.x) then it works fine.Any ideas what I'm missing?
The text was updated successfully, but these errors were encountered: