70 lines
2.2 KiB
Bash
70 lines
2.2 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
_pkgname=pyudev
|
|
pkgname=python-$_pkgname
|
|
pkgver=0.24.1
|
|
pkgrel=02 ## eudev rebuild
|
|
url='https://github.com/pyudev/pyudev'
|
|
pkgdesc='Python bindings to libudev w/o systemd'
|
|
depends=('python-six')
|
|
#makedepends=('python-setuptools' 'python-sphinx' 'python-mock')
|
|
#checkdepends=('python-pytest-runner' 'python-docutils' 'python-mock' 'python-hypothesis')
|
|
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'python-sphinx')
|
|
checkdepends=('python-pytest' 'python-docutils' 'python-hypothesis' 'python-pip')
|
|
optdepends=('python-pyqt5: PyQt integration'
|
|
'pyside2: PySide integration'
|
|
'python-wxpython: WX integration')
|
|
source=("$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
|
|
|
prepare() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
# Remove failing tests (we can't test udev inside makepkg)
|
|
rm tests/test_{util,discover,device,monitor,enumerate,observer}.py
|
|
|
|
# Fix documentation build
|
|
sed -i "s|os.path.join(doc_directory, os.pardir)|os.path.join(doc_directory, os.pardir, 'src')|
|
|
s|b'autodoc-process-docstring'|'autodoc-process-docstring'|" doc/conf.py
|
|
}
|
|
|
|
build() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
python -m build -nw
|
|
|
|
# Generate documentation
|
|
sphinx-apidoc -f -e -o doc src/pyudev
|
|
sphinx-build -a -b html doc doc/html
|
|
}
|
|
|
|
check() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
PYTHONPATH=src python -m pytest
|
|
}
|
|
|
|
package() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
python -m installer -d "$pkgdir" dist/*.whl
|
|
|
|
# Install documentation
|
|
install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
|
|
cp -r -a --no-preserve=ownership doc/html "$pkgdir"/usr/share/doc/$pkgname
|
|
rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('LGPL')
|
|
|
|
sha256sums=(b277149ebca914d3f5daff1a7fa1e0d00bea9c4950af8ac95d9a8a83f2937c79) # pyudev-0.24.1.tar.gz
|
|
|
|
## 0c6f50bee9e5a9ca2a87abac663e4d1076714f55ea9e50fb0b462804db602dff python-pyudev-0.24.1-02-x86_64.pkg.tar.lz
|