python-pycparser: split python3-pycparser

This commit is contained in:
Michal Vasilek 2023-06-17 20:24:21 +02:00
parent efcd455d23
commit 7f93984232
3 changed files with 24 additions and 22 deletions

View File

@ -2,10 +2,9 @@
pkgname=python-pycparser
version=2.21
revision=1
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
build_style=python2-module
hostmakedepends="python-setuptools"
depends="python-ply"
checkdepends="python3-ply python3-pytest"
short_desc="Complete C99 parser in pure Python (Python2)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://github.com/eliben/pycparser"
@ -13,24 +12,8 @@ license="BSD-3-Clause"
distfiles="${PYPI_SITE}/p/pycparser/pycparser-${version}.tar.gz"
checksum=e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
do_check() {
python3 -m pytest
}
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
rm -rf ${DESTDIR}/${py2_sitelib}/pycparser/ply
ln -sf ../ply ${DESTDIR}/${py2_sitelib}/pycparser/ply
vlicense LICENSE
}
python3-pycparser_package() {
depends="python3-ply"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE
}
}

View File

@ -1 +0,0 @@
python-pycparser

View File

@ -0,0 +1,20 @@
# Template file for 'python3-pycparser'
pkgname=python3-pycparser
version=2.21
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-ply"
checkdepends="python3-pytest ${depends}"
short_desc="Complete C99 parser in pure Python (Python3)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://github.com/eliben/pycparser"
license="BSD-3-Clause"
distfiles="${PYPI_SITE}/p/pycparser/pycparser-${version}.tar.gz"
checksum=e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
post_install() {
rm -rf ${DESTDIR}/${py3_sitelib}/pycparser/ply
ln -sf ../ply ${DESTDIR}/${py3_sitelib}/pycparser/ply
vlicense LICENSE
}