summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b93f78c50ea79bfe02d179463ae84d0985159fef (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
# Maintainer: Justin Kromlinger <hashworks@archlinux.org>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=python-dateparser
pkgver=1.2.0
pkgrel=4
pkgdesc="python parser for human readable dates"
url="https://github.com/scrapinghub/dateparser"
arch=('any')
license=('BSD-3-Clause')
depends=(
  'python-dateutil'
  'python-regex'
  'python-tzlocal'
  'python-pytz'
  'python-gitpython'
)
optdepends=(
  'python-langdetect'
  'python-ruamel-yaml: for operations on language files'
  'python-fasttext' # AUR
  'python-convertdate: to convert Jalali dates to Gregorian' # AUR
  'python-hijri-converter: to convert Hijri dates to Gregorian' # AUR

)
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
#checkdepends=(
#  'python-pytest'
#  'python-parameterized'
#  'python-pymeeus' # AUR
#)
source=("${pkgname#python-}-${pkgver}.tar.gz::https://github.com/scrapinghub/dateparser/archive/v${pkgver}.tar.gz")
sha256sums=('13f5b024978a2251043c9d5fa937fcf2120864b36765ab8825eab79f6313fe8c')

build() {
  cd "${pkgname#python-}-${pkgver}"

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

# Currently: 2260 failed, 21272 passed, 14 skipped, 15 warnings in 253.79s (0:04:13)
#check() {
#  cd "${pkgname#python-}-${pkgver}"

#  python -m pytest
#}

package() {
  cd "${pkgname#python-}-${pkgver}"

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

  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
}