archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-soupsieve / trunk / PKGBUILD
blob9c553ee526296eb0c7637f83afbe3488904c801f
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Felix Yan <felixonmars@archlinux.org>
4 pkgname=python-soupsieve
5 pkgver=2.4.1
6 pkgrel=1
7 pkgdesc='A CSS4 selector implementation for Beautiful Soup'
8 arch=('any')
9 url='https://github.com/facelessuser/soupsieve'
10 license=('MIT')
11 depends=('python')
12 makedepends=(
13   'git'
14   'python-build'
15   'python-installer'
16   'python-hatchling'
18 checkdepends=(
19   'python-pytest'
20   'python-beautifulsoup4'
21   'python-html5lib'
22   'python-lxml'
24 _commit='2e66bebb5b5eb2b0824622e17dbdc82ec3459ab3'
25 source=("$pkgname::git+$url#commit=$_commit")
26 b2sums=('SKIP')
28 pkgver() {
29   cd "$pkgname"
31   git describe --tags | sed 's/^v//'
34 build() {
35   cd "$pkgname"
37   python -m build --wheel --no-isolation
40 check() {
41   cd "$pkgname"
43   # https://gitlab.gnome.org/GNOME/libxml2/-/issues/312
44   pytest \
45     --deselect tests/test_extra/test_soup_contains.py::TestSoupContains::test_contains_cdata_html \
46     --deselect tests/test_extra/test_soup_contains_own.py::TestSoupContainsOwn::test_contains_own_cdata_html
49 package() {
50   cd "$pkgname"
52   python -m installer --destdir="$pkgdir" dist/*.whl
54   # license
55   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md