backports/py3-dateparser: upgrade to 1.2.0
This commit is contained in:
parent
c47a118804
commit
07a38065e6
1 changed files with 49 additions and 9 deletions
|
@ -1,28 +1,68 @@
|
|||
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
|
||||
pkgname=py3-dateparser
|
||||
_pyname=${pkgname#py3-}
|
||||
pkgver=1.1.8
|
||||
pkgrel=1
|
||||
pkgver=1.2.0
|
||||
pkgrel=0
|
||||
pkgdesc="Python parser for human readable dates"
|
||||
url="https://github.com/scrapinghub/dateparser"
|
||||
arch="noarch"
|
||||
license="BSD-3-Clause"
|
||||
depends="python3 py3-dateutil py3-regex py3-tz py3-tzlocal"
|
||||
makedepends="py3-setuptools"
|
||||
depends="
|
||||
python3
|
||||
py3-dateutil
|
||||
py3-regex
|
||||
py3-tz
|
||||
py3-tzlocal
|
||||
"
|
||||
makedepends="
|
||||
py3-gpep517
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-fasttext
|
||||
py3-gitpython
|
||||
py3-langdetect
|
||||
py3-parameterized
|
||||
py3-parsel
|
||||
py3-pytest
|
||||
py3-requests
|
||||
py3-ruamel.yaml
|
||||
"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/scrapinghub/dateparser/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pyname-$pkgver"
|
||||
# Requires py3-langdetect and py3-fasttext, which are not in the repository
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
_test_filter='not test_parsing_date_should_fail_using_datetime_strptime_if_locale_is_non_english'
|
||||
# test_custom_language_detect_fast_text fails due to wrong file format
|
||||
case "$CARCH" in
|
||||
s390x)
|
||||
_test_filter="$_test_filter and not test_custom_language_detect_fast_text"
|
||||
;;
|
||||
esac
|
||||
|
||||
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
||||
.testenv/bin/python3 -m installer .dist/*.whl
|
||||
|
||||
# test_hijri.py: needs hijri_converter, test_jalali.py: convertdate
|
||||
.testenv/bin/python3 -m pytest tests \
|
||||
-k "$_test_filter" \
|
||||
--ignore tests/test_hijri.py \
|
||||
--ignore tests/test_jalali.py
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --skip-build --root="$pkgdir"
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
89761427ab0bd194f74d5458930dd3bc01cf654a535547b3bdde651c766d4222d1a9ddc0986c3659d1b2de3a200d6b7dccc227578efabdc208ff98d4f547323a py3-dateparser-1.1.8.tar.gz
|
||||
2d37115f25c2076c4521b77b89ef1cff3cd0a5233c45beb00d78a5c9b1a384dcd993ff7cdd1f77db95a53ce566cf7d709d46ffa2e63eb468ac954fda178a5b6e py3-dateparser-1.2.0.tar.gz
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue