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
Any sdist tarball produced by setuptools_scm >= 7 configured to replace setuptools_scm_git_archive, without writing a _version.py file... will end up installed as version 0.0.
To reproduce:
download the attached archive - a minimal Git repo in a tarball
extract archive
confirm that git describe reports version 2.0.0
note that .git-archival.txt and .gitattributes are present in the documented formats
python -m setuptools_scm reports version 2.0.0
create a sdist (e.g. python -m build --sdist or python setup.py sdist, doesn't matter which is used)
create and activate virtual environment python -m venv v
install sdist to virtual environment pip install dist/setuptools_scm_sdist-2.0.0.tar.gz
"Successfully installed setuptools-scm-sdist-0.0"
python3 -c "import setuptools_scm_sdist" returns 0.0 (it just uses importlib.metadata to look up its installed version and prints it)
I included the whole Git repo in case some feature of the Git repository itself is responsible.
It does not matter if setup.py is just setup() or setup(use_scm_version=True...).
Inspecting the sdist tarballs shows PKG-INFO correct but no substitutions are made in .git_archival.txt.
Using "git archive" to manually create a tarball does produce the expected substitutions.
Any sdist tarball produced by setuptools_scm >= 7 configured to replace setuptools_scm_git_archive, without writing a _version.py file... will end up installed as version 0.0.
To reproduce:
git describe
reports version 2.0.0.git-archival.txt
and.gitattributes
are present in the documented formatspython -m setuptools_scm
reports version 2.0.0python -m build --sdist
orpython setup.py sdist
, doesn't matter which is used)python -m venv v
pip install dist/setuptools_scm_sdist-2.0.0.tar.gz
python3 -c "import setuptools_scm_sdist"
returns0.0
(it just usesimportlib.metadata
to look up its installed version and prints it)I included the whole Git repo in case some feature of the Git repository itself is responsible.
It does not matter if setup.py is just
setup()
orsetup(use_scm_version=True...)
.Inspecting the sdist tarballs shows PKG-INFO correct but no substitutions are made in .git_archival.txt.
Using "git archive" to manually create a tarball does produce the expected substitutions.
Versions: setuptools_scm 7.0.4, setuptools 63.1.0, Python 3.9.13, git 2.32.0
setuptools_scm_sdist.tar.gz
The text was updated successfully, but these errors were encountered: