About
Re-implementing bluepeppers/pip2arch with some improvements:
- Supports generating
PKGBUILDcontained multiple packages. - Smarter package license detection.
- License file installation (by @brycepg).
- Maintainer information generation (by @brycepg).
- Supports generating PEP517 based installation instructments.
Installation
Install from AUR:
$ git clone https://aur.archlinux.org/pip2pkgbuild.git
$ # for Python 2:
$ # git clone https://aur.archlinux.org/python2-pip2pkgbuild.git pip2pkgbuild
$ cd pip2pkgbuild
$ makepkg -si
Install from PyPi:
$ pip install pip2pkgbuild
Install manually:
$ cp pip2pkgbuild/pip2pkgbuild.py ~/bin/pip2pkgbuild
$ chmod u+x ~/bin/pip2pkgbuild
Usage
usage: pip2pkgbuild [-h] [-v MODULE_VERSION] [-p {python,python2,multi}]
[-b PKGBASE] [-n PKGNAME]
[--python2-package-name PY2_PKGNAME]
[-d [DEPENDS [DEPENDS ...]]]
[--python2-depends [DEPENDS [DEPENDS ...]]]
[--python3-depends [DEPENDS [DEPENDS ...]]]
[-m [MKDEPENDS [MKDEPENDS ...]]] [-o] [-V] [-l]
[--name NAME] [--email EMAIL]
module
Generate PKGBUILD file for a Python module from PyPi
positional arguments:
module The Python module name
optional arguments:
-h, --help show this help message and exit
-v MODULE_VERSION, --module-version MODULE_VERSION
Use the specified version of the Python module
-p {python,python2,multi}, --python-version {python,python2,multi}
The Python version on which the PKGBUILD bases
-b PKGBASE, --package-basename PKGBASE
Specifiy the pkgbase value, the first value in the
pkgname array is used by default
-n PKGNAME, --package-name PKGNAME
Specify the pkgname value or the name for the Python 3
based package in a package group
--python2-package-name PY2_PKGNAME
Specify the name for the Python 2 based package in a
package group
-d [DEPENDS [DEPENDS ...]], --depends [DEPENDS [DEPENDS ...]]
Dependencies for the whole PKGBUILD
--python2-depends [DEPENDS [DEPENDS ...]]
Dependencies for the Python 2 based package in a
package group
--python3-depends [DEPENDS [DEPENDS ...]]
Dependencies for the Python 3 based package in a
package group
-m [MKDEPENDS [MKDEPENDS ...]], --make-depends [MKDEPENDS [MKDEPENDS ...]]
Dependencies required while running the makepkg
command
-o, --print-out Print on screen rather than saving to PKGBUILD file
-V, --version show program's version number and exit
-l, --find-license Attempt to find package license to install
--name NAME Your full name for the package maintainer line e.g.
'yourFirstName yourLastName'
--email EMAIL Your email for the package maintainer line
--pep517 Prefer PEP517 based installation method if supporting by the module
Examples
Generate a Python 2 based PKGBUILD for Django with pkgname "django":
$ pip2pkgbuild django -p python2 -n django
Generate PKGBUILD for Flask, containing both Python 2 and 3 packages with pkgbase "flask":
$ pip2pkgbuild flask -p multi -b flask
Metadata
Release files for pip2pkgbuild 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pip2pkgbuild-0.5.0.tar.gz | 12.2 kB | Without provenance | Details for pip2pkgbuild-0.5.0.tar.gz |
Release files / pip2pkgbuild-0.5.0.tar.gz
| Download URL | pip2pkgbuild-0.5.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c7d6eb1592be09618e09c439e358d9723dcd9347763ba2079b8434db3c30ed7
|
|
BLAKE2b-256 checksum How to use checksums |
bc922c42d1793baa531769a1ccc8d3d4157e74a65ce50d47685f3b19d7058b0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for pip2pkgbuild 0.5.0
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.