← Back to DAGDA | Support | Source: https://pypi.org/project/py2pack/0.2.11/
Skip to main content

py2pack

This script allows to generate RPM spec or DEB dsc files from Python modules. It allows to list Python modules or search for them on the Python Package Index (PyPI). Conveniently, it can fetch tarballs and changelogs making it an universal tool to package Python modules.

Prerequisites

py2pack needs the argparse Python module installed. It is also part of the Python-2.7 Standard Library. Additionally, it uses the Jinja2 templating engine.

Usage

Lets suppose you want to package zope.interface and you don’t know how it is named exactly. First of all, you can search for it and download the source tarball if you found the correct module:

$ py2pack search zope.interface
searching for module zope.interface...
found zope.interface-3.6.1
$ py2pack fetch zope.interface
downloading package zope.interface-3.6.1...
from http://pypi.python.org/packages/source/z/zope.interface/zope.interface-3.6.1.tar.gz

As a next step you may want to generate a package recipe for your distribution. For RPM-based distributions (let’s use openSUSE as an example), you want to generate a spec file (named ‘python-zope.interface.spec’):

$ py2pack generate zope.interface -t opensuse.spec -f python-zope.interface.spec

The source tarball and the package recipe is all you need to generate the RPM (or DEB) file. This final step may depend on which distribution you use. Again, for openSUSE (and by using the openSUSE Build Service), the complete recipe is:

$ osc mkpac python-zope.interface
$ cd python-zope.interface
$ py2pack fetch zope.interface
$ py2pack generate zope.interface -t opensuse.spec -f python-zope.interface.spec
$ osc build
...

Depending on the module, you may have to adapt the resulting spec file slightly. To get further help about py2pack usage, issue the following command:

$ py2pack help

License

See the file LICENSE.

Metadata

Release files for py2pack 0.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py2pack 0.2.11
File Size Uploaded Provenance Actions
py2pack-0.2.11.tar.gz 12.3 kB Without provenance Details for py2pack-0.2.11.tar.gz

Release files / py2pack-0.2.11.tar.gz

Download URL py2pack-0.2.11.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
21e2fd3199e5a17b023e1987275f1fa665c5afc2dfab2cd2aa7ba801ff1be1e8
BLAKE2b-256 checksum
How to use checksums
243aa5886de57b5db869269c45c16b803fe27a2ae788ab42f7270945f2381a95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for py2pack 0.2.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.11 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page