44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
# Template file for 'python-pycparser'
|
|
pkgname=python-pycparser
|
|
version=2.18
|
|
revision=2
|
|
noarch=yes
|
|
wrksrc="pycparser-${version}"
|
|
build_style=python-module
|
|
hostmakedepends="python-setuptools python3-setuptools"
|
|
depends="python-ply"
|
|
pycompile_module="pycparser"
|
|
short_desc="Complete C99 parser in pure Python (Python2)"
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
homepage="https://github.com/eliben/pycparser"
|
|
license="3-clause-BSD"
|
|
distfiles="${PYPI_SITE}/p/pycparser/pycparser-${version}.tar.gz"
|
|
checksum=99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
|
|
|
|
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() {
|
|
noarch=yes
|
|
depends="python3-ply"
|
|
pycompile_module="pycparser"
|
|
replaces="python3.4-pycparser>=0"
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
pkg_install() {
|
|
vmove usr/lib/python3*
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
python3.4-pycparser_package() {
|
|
noarch=yes
|
|
build_style=meta
|
|
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
|
|
depends="python3-pycparser>=${version}_${revision}"
|
|
}
|