从pypi为python模块生成pkgbuild文件
pip2pkgbuild的Python项目详细描述
关于
重新实现bluepeppers/pip2arch并进行一些改进:
- 支持生成PKGBUILD包含的multiple packages。
- 更智能的软件包许可检测。
- 许可文件安装(通过@brycepg)。
- 维护者信息生成(通过@brycepg)。
安装
- 从AUR安装:
$ yaourt -S pip2pkgbuild
- 从PyPi安装:
$ pip install pip2pkgbuild
- 手动安装:
$ cp pip2pkgbuild/pip2pkgbuild.py ~/bin/pip2pkgbuild $ chmod u+x ~/bin/pip2pkgbuild
用法
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
示例
- 使用pkgname“django”为Django生成基于python 2的PKGBUILD:
$ pip2pkgbuild django -p python2 -n django
- 为Flask生成PKGBUILD,包含python 2和3个带有pkgbase“flask”的包:
$ pip2pkgbuild flask -p multi -b flask