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

wheel from sdist leads to nuisance error messages in backend #1029

Closed
jaraco opened this issue Apr 2, 2024 · 5 comments
Closed

wheel from sdist leads to nuisance error messages in backend #1029

jaraco opened this issue Apr 2, 2024 · 5 comments
Labels

Comments

@jaraco
Copy link
Member

jaraco commented Apr 2, 2024

In #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).

Because of the way setuptools is engineered, it will necessarily involve setuptools_scm at both phases of the build, during the sdist and then again at the wheel. It's okay to see the error message during the wheel build because it no longer needs the SCM metadata because that's been embedded in the sdist during the sdist phase. In short, I don't think there is currently a way for Setuptools or setuptools_scm to know that it's doing a "wheel from sdist" and thus to disable features like "search for files using git metadata". Therefore, I don't think there's a way to get rid of the error message. Perhaps there's something that could be done, but it would require coordination between build and the backends (setuptools) and their plugins (setuptools_scm).

Originally posted by @jaraco in #997 (comment)

@jaraco
Copy link
Member Author

jaraco commented Apr 2, 2024

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.

@RonnyPfannschmidt
Copy link
Contributor

Setuptools should handle file finders in sdists

@jaraco
Copy link
Member Author

jaraco commented Apr 2, 2024

Can Setuptools know reliably that it's got a expanded sdist and not a git tarball?

@RonnyPfannschmidt
Copy link
Contributor

Not yet, but setuptools-scm is the wrong place for that as long as the file finder api is as limited as it is

@jaraco
Copy link
Member Author

jaraco commented Apr 2, 2024

Oh, my mistake - I meant to file this new issue with packaging-problems. Let me file it again there.

@jaraco jaraco closed this as completed Apr 2, 2024
@jaraco jaraco added the invalid label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants