pypa/build

Build builds source packages with names that are not accepted by Pypi

Closed this issue · 2 comments

My Package is called "Zipped Album Player".

Build will create:

  • dist/Zipped_Album_Player-0.5.0-py3-none-any.whl
  • dist/Zipped Album Player-0.5.0.tar.gz

Pypi accepts the wheel, but not the source package.

The error is:

HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
Start filename for 'Zipped-Album-Player' with 'zipped_album_player'.

This is with Build version 1.0.3, which seems to be the most recent (or at least it is what I get when installing it via PIP).

(Note: This seems to be a recent change at Pypi, since my last versions of the same package could be uploaded without problems.)

The build backend is responsible for creating sdists and wheels; build simply invokes the backend. If you are using setuptools, then setuptools is responsible for naming your sdist.

I think this changed in setuptools 69.0.3, see pypa/setuptools#2522 (comment). I'd recommend opening an issue there. Basically they stopped normalizing the metadata info (good), but forgot that the SDist directly uses the metadata info for names without normalizing it.