py2pack — Generate Distribution Packages from Python Packages on PyPI
The following commands are available:
py2pack
fetch name [version]
Downloads a package from PyPI and stores it in the current directory. Optionally you can specify a version number.
py2pack
generate
[-h] [
-t
{ fedora.spec | opensuse.dsc | opensuse.spec }
] [-f FILENAME
] name [version]
Creates a SPEC or DSC file for a specific distribution.
py2pack
show
[-h] {name} [version]
Shows the DOAP record for the given name and version (optionally). The output is a Python dictionary.
Creating a package from a Python module involves the following steps:
Search for your favorite Python module, for example, :
$
py2pack search pylint
searching for package pylint...
found logilab.pylintinstaller-0.15.2
found plpylint-0.1.2
found pylint-0.22.0
Download
$
py2pack fetch
downloading package pylint-0.22.0...
from http://pypi.python.org/packages/source/p/pylint/pylint-0.22.0.tar.gz
Create a SPEC file, for example, for openSUSE:
$
py2pack generate -t opensuse.spec -f python-pylint.spec pylint
Check the SPEC file
python-pylint.spec
and adapt it to your
needs.