#431 PyPI packages entered with wrong case fail to build
Closed 5 years ago Opened 5 years ago by v02460.

The situation occurs when starting a new build and choosing a package with source type PyPI. If the value entered in the field PyPI package name is not properly capitalized, the build will fail.

Example: For the package Telethon-aio entering telethon-aio (with small t) and then running the build, it will not succeed.

Finding this mistake is unobvious and should probably be caught/corrected early e.g. when submitting the form.


PyPi is case sensitive and you can have module Telethon and telethon which can be totally different modules. We definitely should not autocorrect this name.

Metadata Update from @msuchy:
- Issue status updated to: Closed (was: Open)

5 years ago

I think my wording was not clear and misleading. I am aware oft the fact that packages are case-sensitive and don't want to dispute that point.

However, as far as I can see, Copr will
1. download and proceed with a totally different package than what was entered. (Enter telethon-aio → Copr proceeds with the package Telethon-aio)
2. just fail by chance somewhere later in the build due to some other rather unrelated check failing.

I think this behavior is broken and should be replaced by just failing early. This might be achieved by directly notifying the user that no such package exists and not starting the build.

Hello, we would need to see a concrete build here. Copr mostly just delegates responsibility for building PyPI packages to pyp2rpm tool . We don't really have a good way to find out if package exists or not before running the build.

$ pyp2rpm telethon-aio

and

$ pyp2rpm Telethon-aio

works an they produce some spec that seems to differ in %global pypi_name

This may be a bug in pyp2rpm but it would be good to make a reproducer for this (one build in Copr that fails due to incorrect case and one that succeeds) and then link those issues.

If you discover it is a pyp2rpm bug (that it should be e.g. more strict about case-sensitivity), then you can also open an issue at https://github.com/fedora-python/pyp2rpm.

You can also contact me on #fedora-buildsys for further discussion of this if you want.

Login to comment on this ticket.

Metadata