#741 Clarify the PyPI URL template.
Closed: accepted 2 years ago Opened 2 years ago by rombobeorn.

Packaging:SourceURL provides this URL template:

https://files.pythonhosted.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz

It took me a fair amount of research to figure out that that lone "e" should be replaced with the first letter in the project name. That should be clearly stated to save time for packagers trying to follow the instructions.

I prefer this change for consistency:

https://fedoraproject.org/w/index.php?title=User:Rombobeorn/PyPI_URL_format&diff=509712&oldid=509710

If a smaller change is desired, then this version might be chosen instead:

https://fedoraproject.org/w/index.php?title=User:Rombobeorn/PyPI_URL_format&diff=prev&oldid=509711


or... https://files.pythonhosted.org/packages/source/%(n=%{srcname}; echo ${n:0:1})/%{srcname}/%{srcname}-%{version}.tar.gz

I sent the following by email yesterday, but it has apparently not reached this web interface.

Igor Gnatenko wrote:

or... https://files.pythonhosted.org/packages/source/%(n=%{srcname}; echo ${n:0:1})/%{srcname}/%{srcname}-%{version}.tar.gz

I think Packaging:SourceURL should just explain the correct URL format
without getting fancy, but the example spec file on Packaging:Python
would be improved with that code.

Note, since we already needed to go and change those URL everywhere once, I was thinking maybe we can have a pypi_source_url macro?

What needs to happen for this issue to move forward? I can't find any way to add any kind of "meeting" flag.

I'm not opposed to a pypi_source_url macro, but until somebody writes that macro, can we please correct the URL template?

Metadata Update from @rathann:
- Issue tagged with: hasdraft, meeting

2 years ago

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-2/2018-02-21/fpc.2018-02-21-18.00.txt):

  • x741 Clarify the PyPI URL template (geppetto, 18:10:55)
  • ACTION: Clarify the PyPI URL template (+1:5, 0:0, -1:0) (geppetto,
    18:52:44)

Metadata Update from @james:
- Issue untagged with: meeting
- Issue tagged with: writeup

2 years ago

Metadata Update from @tibbs:
- Issue untagged with: hasdraft, writeup
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

2 years ago

The change is wrong:

https://fedoraproject.org/w/index.php?title=Packaging%3ASourceURL&type=revision&diff=512184&oldid=501457

Should be:

Source0: https://files.pythonhosted.org/packages/source/<first_letter>/%{srcname}/%{srcname}-%{version}.tar.gz

Not just:

Source0: https://files.pythonhosted.org/packages/source/<first_letter>/%{srcname}-%{version}.tar.gz

The change is wrong:

Yes. As it's written now the template yields error 404. There's also an unmatched parenthesis that wasn't there in my proposal.

I wish there were a way to apply a patch to a wiki page to avoid human mistakes.

I screwed it up. I apologize. Is it better now?

If we required only pull requests then this would make things much more difficult for those who aren't native speakers. It is rare that I don't have to fix up grammar or wording in any change once it's approved, so I'd still still have plenty of opportunity to mess things up.

Yes that's better. Thanks.

Login to comment on this ticket.

Metadata