Why does python -mbuild still complain

So, I created a pyproject.toml, added “build” to my file requirements_dev.txt, moved almost everything from setup.py into setup.cfg, and typed python -mbuild.

It still prints:

WARNING setup.py install is deprecated. Use build and pip and other standards-based tools.
*** Installing packages in isolated environment... (setuptools>=42, wheel)**

What is the point of having this warning if there is no way to convince it you have transitioned?

This Discourse category is mainly for discussions of packaging software and standards, not for technical issues. See the users category, or check out Stack Overflow for help


requirements-dev.txt only specifies packages to be installed, and must be explicitly passed (is pip install -r requiremnts-dev.txt). Once build is installed, you can then ignore this file.

To use modern Python packaging standards, you must specify the build back-end, for example (using setuptools):

# pyproject.toml
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 42.0"]

I don’t think this is a technical issue, because my build does work. However it may be in the wrong group; my apologies. My point is that users will be mystified by how to shut-up that message.

Running “python -mbuild” works. But it still prints the WARNING message. In fact, this message persists even if I entirely remove setup.py

As a user, I am mystified. And since I am a very sophisticated user, I know others will be as well.

I shouldn’t have to read the setuptools source to figure out why this message persists.

I’m fairly sure that warning only appears when you haven’t fully transitioned. If you have, then it’s a bug.

Again, to be fully transitioned, you need to specify build-backend in your pyproject.toml.

If I recall correctly, the warning can be unintentionally shown under some combinations of non-current versions of the key packaging dependencies (build, wheel, setuptools, pip, pep517, packaging, etc), and was fixed in up to date versions. I cannot reproduce it running python -b -X dev -m build on the projects I tested with all up to date deps. I suggest running build again in a fresh environment with fully up to date deps, and seeing if you can reproduce it. If so, please report it to the package triggering the warning, with a full pip list, output, platform and Python version in formation, and a project on which you reproduced it. Thanks.

Great, thanks!

I am going to convert my only public project to use a build-backend. I think it lacks my “PurgeCommand” which I asked about before, and so it will be much more vanilla. If the issue occurs in the open source version, then let’s talk.