Closed eranbet closed 2 years ago
Can you try validating your project with something like validate-pyproject
to see exactly what is the problem?
Setting requires = ["setuptools<61.0"] seems to resolve the issue.
Please open an issue in the setuptools repository if that is the case. If you can also share your pyproject.toml
file to see what is going wrong, that would be very helpful.
Please note that setting requires = ["setuptools<61.0"]
effectively disables parsing pyproject.toml
. I don't know if that is exactly what you are looking for.
I did a quick test here and the latest version of setuptools does work normally with the pyproject.toml
example provided in the package tutorial. So probably it would be worthy to investigate a bit more your pyproject.toml
.
I suspect that the logs providaded by setuptools and build also contain a bit more information about what is going wrong... If you scroll before the traceback you are probably going to see some helpful messages. For example, if you accidentally change requires-python
to python-requires
, you should see an error like the following:
configuration error: `project` must not contain {'python-requires'} properties
Hi @eranbet, the upcoming version 63.4.2 of setuptools, should also print a summary of the problem with pyproject.toml
at the bottom of the stack trace, not only at the top.
This should make it easier to spot during debugging.
I think I will close this issue for now since you seem to have moved on and did not provide any further information.
Please feel free to comment in this issue with extra information if you would like the investigation to proceed (I am more than happy to reopen it).
having same issue, here is my .toml file contents.
[build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] name = "Pypack" version = "0.0.1" dependencies = [ "requests", 'importlib-metadata; python_version<"3.8"', ] authors = [ { name="myname", email="myemail@mydomain.com" }, ] description = "A package made to " readme = "README.txt" requires-python = ">=3.8" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU GENERAL PUBLIC LICENSE", "Operating System :: OS Independent", ] [project.urls] "Homepage" = "https://github.com/..." "Bug Tracker" = "https://github.com/.../issues" [project.scripts] load-as-run= "src.Pypack.mod:load" [project.gui-scripts] hello-world = "src.Pypack.mod:hello_world"
changing to setuptools<61.0 fixes issue for me as well.
Setting setuptools<61.0
is very rarely a good solution and it is strongly discouraged. People looking at this issue in the future should not attempt this.
I recommend instead having a look on the traceback and trying to fix the errors described there.
As a reminder from above, setting setuptools<61 causes the project table to be completely ignored. So it doesn't "fix" it, it just builds a UNKNOWN-0.0.0 package with no configuration.
Pasting your traceback (surrounded by triple tick marks for nice GitHub formatting!) would be helpful.
OS version
Ubuntu 20.04
Python version
3.8.10
Pip version
21.3.1
Guide link
https://packaging.python.org/tutorials/packaging-projects
Problem description
Using setuptools as build-system, running python3 -m build throws an error.
Error message