52 lines
1.9 KiB
Bash
52 lines
1.9 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer:
|
|
# Contributor: Andrea Scarpino <andrea@archlinux.org>
|
|
# Contributor: Leif Warner <abimelech@gmail.com>
|
|
|
|
pkgname=python-rdflib
|
|
pkgver=7.1.1
|
|
pkgrel=2
|
|
pkgdesc="A Python library for working with RDF, a simple yet powerful language for representing information"
|
|
arch=(any)
|
|
url="https://github.com/RDFLib/rdflib"
|
|
license=('BSD-3-Clause')
|
|
depends=('python-isodate' 'python-pyparsing' 'python-setuptools')
|
|
makedepends=('python-build' 'python-installer' 'python-poetry-core')
|
|
optdepends=('python-html5lib: for html support')
|
|
checkdepends=('python-pytest' 'python-html5lib' 'python-networkx' 'python-pip')
|
|
source=(https://github.com/RDFLib/rdflib/archive/$pkgver/$pkgname-$pkgver.tar.gz
|
|
python-3.13.patch)
|
|
sha512sums=('0779e57936f6879c5fdcf6f9a09ed925684c496ac226d559ce095ebe295e869b28e5b7b28dcf6ece503c15546bd1aed2ce107fccfa8369d24e7a203c7d751259'
|
|
'232ade01b598e2efd37e5dbbdb34e01f8e4743d750b3a183d453203a1d3291830a506a3c70db33b707a39a3a5300c7a94c99d755672b87495fb64f268448fbf9')
|
|
|
|
prepare() {
|
|
cd rdflib-$pkgver
|
|
patch -p1 -i ../python-3.13.patch # Fedora patch
|
|
}
|
|
|
|
build() {
|
|
cd rdflib-$pkgver
|
|
python -m build --wheel --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd rdflib-$pkgver
|
|
python -m venv --system-site-packages test-env
|
|
test-env/bin/python -m installer dist/*.whl
|
|
local pytest_args=(
|
|
-v
|
|
# https://github.com/RDFLib/rdflib/issues/2748
|
|
--deselect=test/test_misc/test_parse_file_guess_format.py::TestFileParserGuessFormat::test_warning
|
|
# Requires python-pytest-cov.
|
|
--deselect=test/test_misc/test_plugins.py::test_parser
|
|
--deselect=test/test_misc/test_plugins.py::test_sparqleval
|
|
)
|
|
test-env/bin/python -m pytest "${pytest_args[@]}"
|
|
}
|
|
|
|
package() {
|
|
cd rdflib-$pkgver
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|