summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0fa135773c304eff6427099bad5db77d72978a9a (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
# Maintainer: Gesh <gesh@gesh.uni.cx>
# Contributor: JP-Ellis <josh@jpellis.me>

pkgname='python-habanero'
pkgver='2.2.0'
pkgrel=3
_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-httpx'
  'python-packaging'
  'python-pyyaml'
  '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-cov'
  'python-pytest-recording'
)
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=('18c5c3b59b8db1887811da6de8bd976ac4077d61a25a058f3a67044e8bcab8eb')

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

check() {
    cd "${srcdir}/${_src_folder}"
    python -m pytest
}

package() {
    cd "${srcdir}/${_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: