summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c921e013c10a5ad4bef757bfff8748459abf3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Gesh <gesh@gesh.uni.cx>
# Contributor: JP-Ellis <josh@jpellis.me>

pkgname=python-habanero
pkgver=2.9.2
pkgrel=2
_name=${pkgname#python-}
_name="${_name//-/_}"
_src_folder="${_name}-${pkgver}"
pkgdesc="A low level client for Crossref's Search API"
url="https://github.com/sckott/habanero"
depends=(
  'python'
  'python-httpx2'
  'python-packaging'
  'python-tqdm'
  'python-urllib3'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-hatchling'
)
checkdepends=(
  # Only needed to test integration of the optdep, uncomment this if using
  # 'python-bibtexparser>=2.0.0b5'
  'python-pytest'
  'python-pytest-recording'
  'python-pyyaml'
)
optdepends=(
  'python-bibtexparser: attempt to fix misformatted bibtex'
)
license=('MIT')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('efcdfecec965c413e0f1ee9034fbe955d42e6b815b0784aa0c4a3df2cc272019')

build() {
    cd "$_src_folder"
    python -m build --wheel --no-isolation
}

check() {
    cd "$_src_folder"

    python -m pytest --disable-plugin-autoload \
      -p recording
}

package() {
    cd "$_src_folder"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/"$pkgname"/
}

# vim:set ts=2 sw=2 et: