#1005 Revise pypi_source macro to support python wheel URLs
Closed: wontfix a year ago by ngompa. Opened 2 years ago by survient.

Currently the %{pypi_source} rpm macro only supports pulling pure source files from pypi and is unable to be used for pypi wheels. The URL is different as outlined here https://github.com/pypa/pypi-legacy/issues/438#issuecomment-226940714

I am -1 for this. My reasons:

1) Fedora packages should be built from sources. Wheels are not sources.

2) Sdists have deterministic names (and hence URLs) based on project name, version and extension (with 99% hit on the default value). Wheels have deterministic names based on so much more: project name, version, compatibility with Python versions, compatibility with Python interpreter kind, compatibility with Python ABI flags, compatibility with platform, compatibility with architecture. See for example wheels for numpy: https://pypi.org/project/numpy/#files as such, the %{pypi_source} would need to take almost the entire wheel name as an argument and hence it's easier if the packager constructs the URLs on their own.

I appreciate churchyard's feedback. After reaching out to the upstream that I'm messing with to build a package within minutes they had a tarball uploaded to pypi.

That said out of my own ignorance with a Universal Python Wheel:


they are described in the doc as "pure Python" would that not be a case where a wheel is suitable as a source? It feels like I'm missing something pretty obvious here.

Universal pure Python wheels technically contain only Python source, but they might contain platform-agnostic generated content as well. While in many cases, they don't, I strongly advice against using them as sources in general case. Using a github (gitlab, etc.) tarball is preferred over wheel when sdist is not available or incomplete.

Is there any reason for this ticket to remain open?

I don't think so. Let's close this.

Metadata Update from @ngompa:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.