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
I see the following error during build time and I think that it shouldn't be raised or there should be another message saying that it is safe to ignore it.
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
"python3 -m build builds in 2 phases: 1st it builds sdist and then it builds wheel from the sdist in an isolated environment where there is no .git directory. It doesn't matter because at the wheel building phase version is already set in sdist and build gets the version from sdist, not from setuptools_scm. In short: you may safely ignore the error."
Reproducible example
cd /tmp/
mkdir setuptools_scm_example
cd setuptools_scm_example
git init
touch .gitignore
git add .
git commit -m "Initial commit"
Add the following to pyproject.toml
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm>=7.0"]
build-backend = "setuptools.build_meta"
[project]
name = "example_package"
dynamic = ["version"]
[tool.setuptools_scm]
# No additional configuration needed, but can add if needed
Create and build a python package
mkdir -p example_package
touch example_package/__init__.py
echo "print('Hello from example package')" > example_package/__init__.py
python3 -m build
I see the error
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
The text was updated successfully, but these errors were encountered:
I see the following error during build time and I think that it shouldn't be raised or there should be another message saying that it is safe to ignore it.
I asked this question on Stack Overflow https://stackoverflow.com/questions/79313343/how-to-fix-setuptools-scm-file-finders-git-listing-git-files-failed and got the following response :
Reproducible example
Add the following to pyproject.toml
Create and build a python package
I see the error
The text was updated successfully, but these errors were encountered: