python-lxml: port to build/installer

This commit is contained in:
Christoph Reiter
2022-12-17 10:38:42 +01:00
parent 1309a84647
commit de554ba610

View File

@@ -4,30 +4,41 @@ _realname=lxml
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=4.9.1
pkgrel=1
pkgrel=2
pkgdesc="Python binding for the libxml2 and libxslt libraries"
arch=('any')
url="https://lxml.de/"
license=('spdx:BSD-3-Clause')
depends=("python" "libxslt" "libxml2")
makedepends=("gcc" "cython" "libxslt-devel" "libxml2-devel" "pkgconf" "python-setuptools")
makedepends=(
"gcc"
"cython"
"libxslt-devel"
"libxml2-devel"
"pkgconf"
"python-setuptools"
"python-wheel"
"python-build"
"python-installer"
)
source=("https://github.com/lxml/lxml/archive/${_realname}-${pkgver}.tar.gz")
sha256sums=('e46a74cef580e069586b7a98e9a74b49e56b849822130654d28e00826db75095')
prepare() {
mv "lxml-lxml-${pkgver}" "lxml-${pkgver}"
# Setting LC_CTYPE to workaround encoding issue
export LC_CTYPE=en_US.UTF-8
}
build() {
cd "${_realname}-${pkgver}"
/usr/bin/python setup.py build
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${_realname}-${pkgver}"
/usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" -O1
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSES.txt "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSES.txt"
}