-
Notifications
You must be signed in to change notification settings - Fork 39
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
wheel from sdist leads to nuisance error messages in backend #742
Comments
Perhaps there's something that should be added to the build infrastructure to let the backends (and their plugins) know that it's working from an sdist, so it can make assumptions about the source code. |
This is something that's come up a few times recently. My first question would be, what does it mean to be "working from a sdist"?
If we only want (1) to count as "building from the sdist", then maybe we could add a new flag to the I don't see any way of detecting (2), and more specifically, I see no way of distinguishing (2) and (3). Unfortunately, because of (3), we can't reasonably rely on anything in the source directory to mark it as a sdist - checking for |
Note the opening comment here says "setuptools_scm was complaining" but let's be clear what the message is:
It is unnerving as a user to see that ERROR message reported. I spent ages trying to track down what I was doing wrong until I discovered this bug which now refers to here. |
i consider this particular issue a setuptools problem - other build tools cache file details in the sdist (like hatch) |
I noticed this error today and while investigating I found some circumstances that did not reproduce the issue where [testenv:.pkg]
deps =
build
setuptools>=64
wheel
setuptools_scm>=8
package_glob = {work_dir}{/}.pkg{/}tmp{/}dist{/}*.whl
commands =
pyproject-build --outdir {work_dir}{/}.pkg{/}tmp{/}dist{/} --no-isolation \
--skip-dependency-check Then I can reproduce the error when I let tox build the package that way. Note that the error appears twice: $ tox run -e py311 --override testenv.package=external --pkg-only
...
.pkg: 123 W commands[0]> pyproject-build --outdir ~/src/foo-pkg/.tox/.pkg/tmp/dist/ --no-isolation --skip-dependency-check [tox/tox_env/api.py:427]
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- setuptools>=45
- setuptools_scm>=6.2
- wheel
* Getting build dependencies for sdist...
running egg_info
...
* Building sdist...
...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- setuptools>=45
- setuptools_scm>=6.2
- wheel
* Getting build dependencies for wheel...
running egg_info
...
writing top-level names to src/foo-pkg.egg-info/top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'src/foo-pkg.egg-info/SOURCES.txt'
writing manifest file 'src/foo-pkg.egg-info/SOURCES.txt'
* Building wheel...
...
writing top-level names to src/foo-pkg.egg-info/top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'src/foo-pkg.egg-info/SOURCES.txt'
writing manifest file 'src/foo-pkg.egg-info/SOURCES.txt'
... But I can not reproduce the error when tox runs the same Hope this helps. |
In pypa/setuptools-scm#997, I observed that setuptools_scm was complaining about not being able to discover files when building from a git repo. As it turns out, the issue occurred when the pep517 build infrastructure was building a wheel from the sdist (so git metadata wouldn't be expected).
Originally posted by @jaraco in pypa/setuptools-scm#997 (comment)
The text was updated successfully, but these errors were encountered: