-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
setuptools_scm seems to be used even though it's not mentioned in pyproject.toml nor installed #976
Comments
Sorry, the above is not reported entirely accurately. I figured out most of what was going on. The main thing was that in between my "python -m build" commands, while I was varying pyproject.toml to include or not include mention of setuptools_scm, I was not deleting the src/myrootpackage.egg-info directory. As a result, state was being carried over between build commands unexpectedly, affecting the contents of the built sdist and wheel. Another thing that was a bit unexpected is that while use of setuptools_scm seems to include additional files from SCM in the build result, it does not prevent files that are NOT in SCM from being included in the build result if setuptools wants to put them in the build -- for example, non-checked-in python files sitting next to checked-in ones in the python source areas. |
@rvsasseen , thanks for your follow-up. could you please explain how you fixed the error below? ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any |
Well, I ended up not using setuptools_scm in the project, so that's mostly how I "fixed" that error. I'm still interested in its ability to get the version number from SCM, but I don't actually need that now, so I have not pursued getting setuptools_scm to work on any projects yet. Sorry I can't be more help there. |
You might try doing "rm -rf build src/myrootpackage.egg-info" to clean up your build artifacts and see if that helps. |
@rvsasseen thanks a lot for your answer! i'll give it a try. |
I'm setting up a new project using pyproject.toml rather than setup.py/setup.cfg which is used for most projects at my company. I am finding that setuptools_scm seems to be used even though it's not mentioned in pyproject.toml nor installed. I say that because only files that are checked into git are getting put into the distribution. I don't understand why that is happening. I've seen your issues like #190 and #561, but those suggest that that would happen if setuptools_scm is installed in the python environment, but not if it's not.
The following output is from a newly created conda environment where I do "python -m build", with setuptools_scm not installed. I get the same behavior from "python -m build" locally on my Mac and on Linux in our GitLab CI server. (CI is run in a docker container, and does not involve a conda env.)
I originally started out with setuptools_scm mentioned both in the requires and as a section in pyproject.toml, but have experimented with variations where I leave those out. (The original pyproject.toml I borrowed from another project had setuptools_scm listed in the requires, so I was exploring what that was about.) No matter what, only files checked into git get put into the sdist and wheel.
A couple more things. First, with or without setuptools_scm being mentioned or installed, I get warnings like
for files listed as exclude in MANIFEST.in. I expect that's not really related to setuptools_scm, though.
Second, with it being mentioned and/or installed, I get "errors" like
(during building of the wheel) but they don't seem to cause any real problems.
The text was updated successfully, but these errors were encountered: