summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 92cfcc654c4745bdf4f9bb0f2c6226edf9827767 (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
58
59
60
61
62
63
64
65
66
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>

pkgname=sqlitebiter
pkgver=0.36.1
pkgrel=1
pkgdesc='Converts tabular formats into a SQLite database file'
arch=('any')
url='https://github.com/thombashi/sqlitebiter'
license=('MIT')
depends=(
  'jupyter-nbformat'
  'python-appconfigpy'
  'python-click'
  'python-envinfopy'
  'python-loguru'
  'python-msgfy'
  'python-path'
  'python-pathvalidate'
  'python-pytablereader'
  'python-retryrequests'
  'python-simplesqlite'
  'python-tcolorpy'
  'python-typepy')
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel')
checkdepends=(
  'python-pytest'
  'python-responses'
  'python-sqliteschema' ## AUR
  'python-xlrd'
  'python-xlsxwriter')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz"
        "$pkgname-$pkgver.tar.gz.asc::https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz.asc")
sha256sums=('60516bda8aa5f2b560359538f289b6453dad2f05cf491ff81d4294859b2ce3ba'
            'SKIP')
validpgpkeys=('BCF9203E5E80B5607EAE6FDD98CDA9A5F0BFC367')

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

## FIXME: upstream tests fail
check() {
  cd "$pkgname-$pkgver"
  PYTHONPATH="$PWD" pytest -x --disable-warnings
}

package() {
  export PYTHONHASHSEED=0
  cd "$pkgname-$pkgver"
  python -m installer --destdir="$pkgdir/" dist/*.whl
  install -Dm644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"

  local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
  install -d "$pkgdir/usr/share/licenses/$pkgname/"
  ln -s \
    "$_site/$pkgname-$pkgver.dist-info/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/"
}

# vim: ts=2 sw=2 et: