summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4203804320eae138c9c89c5ff8dbbc96acced650 (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
67
68
69
70
# Contributor: Rafael Dominiquini <rafaeldominiquini at gmail dot com>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
# Contributor: Florian Wittmann

_pypi_name=pytablereader
_name=${_pypi_name,,}

pkgname=python-${_name,,}
pkgver=0.31.4
pkgrel=1
pkgdesc='Python library to read a table in various formats'
arch=('any')
url="https://github.com/thombashi/${_pypi_name}"
license=('MIT')
makedepends=(
  'git'
  'python-setuptools'
  'python-build'
  'python-installer'
  'python-wheel'
  'python-sphinx'
  'python-sphinx_rtd_theme')
depends=(
  'python'
  'python-markdown'
  'python-mbstrdecoder'
  'python-pypandoc'
  'python-path'
  'python-requests'
  'python-loguru'
  'python-typepy'
  'python-jsonschema'
  'python-oauth2client'
  'python-simplejson'
  'python-tabledata'
  'python-beautifulsoup4'
  'python-xlrd'
  'python-pathvalidate'
  'python-dataproperty'
  'python-pytablereader')

source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name//-/_}/${_name//-/_}-${pkgver}.tar.gz")
sha256sums=('ad97308308525cafe0eaa4b6a80a02499e0b4c6c979efb17452d302ad78bd5b1')
validpgpkeys=('BCF9203E5E80B5607EAE6FDD98CDA9A5F0BFC367')

build() {
  cd "${_name}-$pkgver"

  python -m build --wheel --no-isolation

  rst2man README.rst "$pkgname.7"
}

package() {
  cd "${_name}-$pkgver"

  export PYTHONHASHSEED=0
  python -m installer --destdir="$pkgdir/" dist/*.whl

  install -Dm644 "$pkgname.7" -t "$pkgdir/usr/share/man/man7/"

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

# vim: ts=2 sw=2 et: