void-packages/srcpkgs/python-pycparser/template
2019-12-23 15:10:44 +01:00

36 lines
1 KiB
Bash

# Template file for 'python-pycparser'
pkgname=python-pycparser
version=2.19
revision=2
archs=noarch
wrksrc="pycparser-${version}"
build_style=python-module
pycompile_module="pycparser"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-ply"
short_desc="Complete C99 parser in pure Python (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/eliben/pycparser"
license="BSD-3-Clause"
distfiles="${PYPI_SITE}/p/pycparser/pycparser-${version}.tar.gz"
checksum=a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
post_install() {
# replace bundled copy of ply
for pyver in $py2_ver $py3_ver; do
rm -rf ${DESTDIR}/usr/lib/python${pyver}/site-packages/pycparser/ply
ln -sf ../ply ${DESTDIR}/usr/lib/python${pyver}/site-packages/pycparser/ply
done
vlicense LICENSE
}
python3-pycparser_package() {
archs=noarch
depends="python3-ply"
pycompile_module="pycparser"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE
}
}