pypa / setuptools_scm

the blessed package to manage your versions by scm tags

Home Page:https://setuptools-scm.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wheel from sdist leads to nuisance error messages in backend

jaraco opened this issue · comments

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)

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.

Setuptools should handle file finders in sdists

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

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

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