python-lxml/PKGBUILD

53 lines
1.4 KiB
Bash
Raw Permalink Normal View History

2024-11-04 15:33:53 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
2024-11-04 15:56:46 +08:00
pkgname=(python-lxml python-lxml-docs)
pkgbase=python-lxml
pkgver=5.3.0
2024-11-04 15:33:53 +08:00
pkgrel=1
pkgdesc="Python3 binding for the libxml2 and libxslt libraries"
arch=('x86_64')
url="https://lxml.de"
license=('BSD' 'custom')
depends=('python' 'libxslt')
makedepends=(
'python-build'
'python-installer'
'python-flit-core'
'python-wheel'
2024-11-04 15:56:46 +08:00
'python-pygments'
'python-sphinx'
'python-sphinx_rtd_theme'
2024-11-04 15:33:53 +08:00
'python-cython'
)
2024-11-04 15:56:46 +08:00
source=(https://github.com/lxml/lxml/releases/download/${pkgbase#*-}-${pkgver}/${pkgbase#*-}-${pkgver}.tar.gz)
sha256sums=(4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f)
2024-11-04 15:33:53 +08:00
build() {
2024-11-04 15:56:46 +08:00
cd ${pkgbase#*-}-${pkgver}
2024-11-04 15:33:53 +08:00
2024-11-04 15:56:46 +08:00
export LC_CTYPE=en_US.UTF-8
2024-11-04 15:33:53 +08:00
2024-11-04 15:56:46 +08:00
python3 -m build -nw
make html
2024-11-04 15:33:53 +08:00
}
2024-11-04 15:56:46 +08:00
package_python-lxml() {
cd ${pkgbase#*-}-${pkgver}
2024-11-04 15:33:53 +08:00
python3 -m installer -d ${pkgdir} dist/*.whl
}
2024-11-04 15:56:46 +08:00
package_python-lxml-docs() {
pkgdesc="Python binding for the libxml2 and libxslt libraries (docs)"
depends=()
cd ${pkgbase#*-}-${pkgver}
install -d ${pkgdir}/usr/share/doc/${pkgbase}
cp -r doc/html ${pkgdir}/usr/share/doc/${pkgbase}
}