aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0fd8d94b2f46beeaea099f842f716aa835efeec5 (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
# Maintainer: Shimi Chen <shimi dot chen at gmail dot com>

pkgname=python-pykrx
_pkgname=pykrx
pkgver=1.2.8
pkgrel=1
pkgdesc="KRX (Korea Exchange) stock and bond data scraping library"
arch=('any')
url="https://github.com/sharebook-kr/pykrx"
license=('MIT')
depends=(
  'python'
  'python-requests'
  'python-pandas'
  'python-numpy'
  'python-deprecated'
  'python-multipledispatch'
  'python-matplotlib'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
  'python-setuptools'
  'python-setuptools-scm'
)
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha256sums=('b2da03e62047db0ca7eefbcdf5bc2489857fa25a6faf1c2ddbb070b10fab0246')

build() {
  cd "$_pkgname-$pkgver"
  # setuptools_scm reads the version from the PKG-INFO shipped in the sdist.
  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  # Upstream declares the MIT license in its metadata but ships no LICENSE
  # file in the release tarball or repository, so there is none to install.
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}