pendulum
This commit is contained in:
parent
cf8a73fb68
commit
89cc95a46e
67
python3-pendulum/alr.sh
Normal file
67
python3-pendulum/alr.sh
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
_name=pendulum
|
||||||
|
name='python3-pendulum'
|
||||||
|
version='3.0.0'
|
||||||
|
release='1'
|
||||||
|
desc='Python datetimes made easy'
|
||||||
|
homepage='https://pendulum.eustace.io/'
|
||||||
|
license=('MIT')
|
||||||
|
architectures=('amd64')
|
||||||
|
provides=('pendulum')
|
||||||
|
conflicts=('pendulum')
|
||||||
|
|
||||||
|
deps=(
|
||||||
|
'libgcc'
|
||||||
|
'glibc'
|
||||||
|
'python'
|
||||||
|
'python3-dateutil'
|
||||||
|
'python3-tzdata'
|
||||||
|
'python3-time-machine'
|
||||||
|
)
|
||||||
|
|
||||||
|
build_deps=(
|
||||||
|
'python3-build'
|
||||||
|
'python3-installer'
|
||||||
|
'python3-maturin'
|
||||||
|
'python3-wheel'
|
||||||
|
)
|
||||||
|
|
||||||
|
build_deps_almalinux=(
|
||||||
|
'python3-build'
|
||||||
|
'python3-installer'
|
||||||
|
'python3-maturin'
|
||||||
|
'python3.12-wheel'
|
||||||
|
'python3-babel'
|
||||||
|
'python3-freezegun'
|
||||||
|
'python3-pytest'
|
||||||
|
'python3-pytz'
|
||||||
|
'python3-pytzdata'
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
sources=("https://github.com/sdispater/pendulum/archive/$version.tar.gz")
|
||||||
|
checksums=('SKIP')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $_name-$version
|
||||||
|
python -m build --wheel --no-isolation
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
local pytest_options=(
|
||||||
|
-vv
|
||||||
|
)
|
||||||
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||||
|
|
||||||
|
cd $_name-$version
|
||||||
|
# install to temporary location, as importlib is used
|
||||||
|
python -m installer --destdir=test_dir dist/*.whl
|
||||||
|
export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
|
||||||
|
pytest "${pytest_options[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $_name-$version
|
||||||
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
|
install -vDm 644 {CHANGELOG.md,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||||
|
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user