#807 SourceURL guidelines for PyPI: Use %{pypi_source}
Merged 6 months ago by tibbs. Opened 6 months ago by churchyard.
churchyard/packaging-committee source_pypi  into  master

@@ -60,12 +60,16 @@ 

  

  == Python Packages (pypi)

  

- As Pypi has moved to storing files in directories which change depending on the file being stored, it is rather unpleasant to use in a Source: URL. Instead, files.pythonhosted.org can be used as follows, where `+%srcname+` is the project's name on pypi and is the first letter of that name. (See also the sample python spec Packaging:Python#Example_common_spec_file[here]).

+ As PyPI has moved to storing files in directories which change depending on the file being stored,

+ it is rather unpleasant to use in a Source: URL.

+ Instead, files.pythonhosted.org can be used trough the `+%{pypi_source}+` macro.

  

  ....

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

+ Source0: %{pypi_source}

  ....

  

+ See more about the macro in the xref:Python.adoc#_source_files_from_pypi[Python guidelines].

+ 

  == Sourceforge.net

  

  For packages hosted on sourceforge, use

(Not sure if the anchor should be done like this.)

use backtick with plus sign to not escape anything inside.

I would probably also create explicit anchor in python.adoc which you would reference here. (for example see index.adoc/Exceptions)

What's there to escape? Or juts for good manners? Is it pluses outside or inside of backticks?

Imagine something like:

:some_url: https://google.com

`%{some_url}`

In HTML it will be shown as: %https://google.com

While if you use

`+%{some_url}+`

it won't get substituted.

rebased onto 7094185

6 months ago

Pull-Request has been merged by tibbs

6 months ago

Looks good to me and it seems obvious that we'd want to be consistent.

Metadata