Open Conchylicultor opened 2 years ago
Looks like that error message is coming directly from pypi.org as part of the 400 error, not flit
Renaming "epot-test"
-> "epot_test" fixed the issue, but it's very non-obvious to guess from the error message.
It would be nice if flit was checking this (maybe during flit build
rather than this error in flit publish
).
Yes, Flit should check that. It's a quirk because in the old style metadata ([tool.flit.metadata]
), you specified the import name first, which has to be a valid Python identifier, and you only entered the PyPI name if you wanted that to be different. The new style metadata ([project]
) works the other way - you specify the PyPI name first, and only specify the import name if that's different.
We should normalise the name generated for the sdist, using the same rules as wheels. That'll avoid the weird error message?
I think the error is because Flit fills out the old Provides
metadata field. It's officially deprecated since PEP 345, and doesn't even appear in the core metadata spec page, but it's still accepted, and when I started Flit I thought it was a good idea for package metadata to say which top level modules it contained.
Flit fail when trying to upload a minimal package:
Commands:
flit publish
fails with:flit --version
isFlit 3.7.1
It's very non obvious from the error message what is the issue with my toml file. It would be nice to have more explicit error messages.