[![PyPi](https://img.shields.io/pypi/v/pip2pkgbuild.svg)](https://pypi.org/project/pip2pkgbuild/)
[![Downloads](https://static.pepy.tech/badge/pip2pkgbuild)](https://pypi.org/project/pip2pkgbuild/)
# About
Re-implementing [`bluepeppers/pip2arch`](https://github.com/bluepeppers/pip2arch>) with some improvements:
- Supports generating `PKGBUILD` contained [multiple packages](https://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting).
- Smarter package license detection.
- License file installation (by @brycepg).
- Maintainer information generation (by @brycepg).
- Supports generating PEP517 based installation instructments.
# Installation
Install from `AUR`:
```shell
$ 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`:
```shell
$ pip install pip2pkgbuild
```
Install manually:
```shell
$ 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":
```shell
$ pip2pkgbuild django -p python2 -n django
```
Generate `PKGBUILD` for `Flask`, containing both Python 2 and 3 packages with `pkgbase` "flask":
```shell
$ pip2pkgbuild flask -p multi -b flask
```
Raw data
{
"_id": null,
"home_page": "https://github.com/wenLiangcan/pip2pkgbuild",
"name": "pip2pkgbuild",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Packaging ArchLinux PKGBUILD",
"author": "wenLiangcan",
"author_email": "boxeed@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bc/92/2c42d1793baa531769a1ccc8d3d4157e74a65ce50d47685f3b19d7058b0e/pip2pkgbuild-0.5.0.tar.gz",
"platform": "any",
"description": "\n[![PyPi](https://img.shields.io/pypi/v/pip2pkgbuild.svg)](https://pypi.org/project/pip2pkgbuild/)\n[![Downloads](https://static.pepy.tech/badge/pip2pkgbuild)](https://pypi.org/project/pip2pkgbuild/)\n\n# About\n\nRe-implementing [`bluepeppers/pip2arch`](https://github.com/bluepeppers/pip2arch>) with some improvements: \n\n- Supports generating `PKGBUILD` contained [multiple packages](https://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting).\n- Smarter package license detection.\n- License file installation (by @brycepg).\n- Maintainer information generation (by @brycepg).\n- Supports generating PEP517 based installation instructments.\n\n\n# Installation\n\nInstall from `AUR`:\n```shell\n$ git clone https://aur.archlinux.org/pip2pkgbuild.git\n$ # for Python 2:\n$ # git clone https://aur.archlinux.org/python2-pip2pkgbuild.git pip2pkgbuild\n$ cd pip2pkgbuild\n$ makepkg -si\n```\n\nInstall from `PyPi`:\n```shell\n$ pip install pip2pkgbuild\n```\n\nInstall manually:\n```shell\n$ cp pip2pkgbuild/pip2pkgbuild.py ~/bin/pip2pkgbuild\n$ chmod u+x ~/bin/pip2pkgbuild\n```\n\n# Usage\n```\n usage: pip2pkgbuild [-h] [-v MODULE_VERSION] [-p {python,python2,multi}]\n [-b PKGBASE] [-n PKGNAME]\n [--python2-package-name PY2_PKGNAME]\n [-d [DEPENDS [DEPENDS ...]]]\n [--python2-depends [DEPENDS [DEPENDS ...]]]\n [--python3-depends [DEPENDS [DEPENDS ...]]]\n [-m [MKDEPENDS [MKDEPENDS ...]]] [-o] [-V] [-l]\n [--name NAME] [--email EMAIL]\n module\n\n Generate PKGBUILD file for a Python module from PyPi\n\n positional arguments:\n module The Python module name\n\n optional arguments:\n -h, --help show this help message and exit\n -v MODULE_VERSION, --module-version MODULE_VERSION\n Use the specified version of the Python module\n -p {python,python2,multi}, --python-version {python,python2,multi}\n The Python version on which the PKGBUILD bases\n -b PKGBASE, --package-basename PKGBASE\n Specifiy the pkgbase value, the first value in the\n pkgname array is used by default\n -n PKGNAME, --package-name PKGNAME\n Specify the pkgname value or the name for the Python 3\n based package in a package group\n --python2-package-name PY2_PKGNAME\n Specify the name for the Python 2 based package in a\n package group\n -d [DEPENDS [DEPENDS ...]], --depends [DEPENDS [DEPENDS ...]]\n Dependencies for the whole PKGBUILD\n --python2-depends [DEPENDS [DEPENDS ...]]\n Dependencies for the Python 2 based package in a\n package group\n --python3-depends [DEPENDS [DEPENDS ...]]\n Dependencies for the Python 3 based package in a\n package group\n -m [MKDEPENDS [MKDEPENDS ...]], --make-depends [MKDEPENDS [MKDEPENDS ...]]\n Dependencies required while running the makepkg\n command\n -o, --print-out Print on screen rather than saving to PKGBUILD file\n -V, --version show program's version number and exit\n -l, --find-license Attempt to find package license to install\n --name NAME Your full name for the package maintainer line e.g.\n 'yourFirstName yourLastName'\n --email EMAIL Your email for the package maintainer line\n --pep517 Prefer PEP517 based installation method if supporting by the module\n```\n\n\n# Examples\n\nGenerate a Python 2 based `PKGBUILD` for `Django` with `pkgname` \"django\":\n```shell\n$ pip2pkgbuild django -p python2 -n django\n```\n\nGenerate `PKGBUILD` for `Flask`, containing both Python 2 and 3 packages with `pkgbase` \"flask\":\n```shell\n$ pip2pkgbuild flask -p multi -b flask\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Generate PKGBUILD file for a Python module from PyPI",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/wenLiangcan/pip2pkgbuild"
},
"split_keywords": [
"packaging",
"archlinux",
"pkgbuild"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bc922c42d1793baa531769a1ccc8d3d4157e74a65ce50d47685f3b19d7058b0e",
"md5": "a86fd62ccf90d0fa0172f8988a2bb150",
"sha256": "6c7d6eb1592be09618e09c439e358d9723dcd9347763ba2079b8434db3c30ed7"
},
"downloads": -1,
"filename": "pip2pkgbuild-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "a86fd62ccf90d0fa0172f8988a2bb150",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12180,
"upload_time": "2024-08-06T14:51:59",
"upload_time_iso_8601": "2024-08-06T14:51:59.926535Z",
"url": "https://files.pythonhosted.org/packages/bc/92/2c42d1793baa531769a1ccc8d3d4157e74a65ce50d47685f3b19d7058b0e/pip2pkgbuild-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-06 14:51:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wenLiangcan",
"github_project": "pip2pkgbuild",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pip2pkgbuild"
}