From Fedora Project Wiki
(current text)
 
(Category:Packaging guidelines drafts)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Python Packages (pypi) ==
 
== 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 <code>%srcname</code> is defined in 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 as follows, where <code>&lt;name&gt;</code> is the project's name on Pypi and <code>&lt;first_letter&gt;</code> is the first letter in that name. (See also the sample python spec [[Packaging:Python#Example common spec file|here]]).
  
 
<pre>
 
<pre>
Source0: https://files.pythonhosted.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz
+
Source0: https://files.pythonhosted.org/packages/source/&lt;first_letter&gt;/&lt;name&gt;/&lt;name&gt;-%{version}.tar.gz
 
</pre>
 
</pre>
 +
 +
[[Category:Packaging guidelines drafts]]

Latest revision as of 23:29, 20 January 2018

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 <name> is the project's name on Pypi and <first_letter> is the first letter in that name. (See also the sample python spec here).

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