Files
alr-repo/python3-pendulum/alr.sh

112 lines
2.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

_name=pendulum
name='python3-pendulum'
version='3.1.0'
release='2'
desc='Python datetimes made easy'
desc_ru='Библиотека Python для удобной работы с датой и временем'
homepage='https://pendulum.eustace.io/'
maintainer='Evgeny Khramov <xpamych@yandex.ru>'
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
license=('MIT')
architectures=('amd64')
provides=('pendulum')
conflicts=('pendulum')
deps=(
'libgcc'
'glibc'
'python3'
'python3-dateutil'
'python3-tzdata'
'python3-time-machine'
)
deps_alt=(
'libgcc'
'glibc-core'
'python3'
'python3-module-dateutil'
'python3-module-tzdata'
'python3-module-time-machine'
)
deps_arch=(
'gcc-libs'
'glibc'
'python'
'python-dateutil'
'python-tzdata'
'python-time-machine'
)
deps_debian=(
'libgcc-s1'
'libc6'
'python3'
'python3-dateutil'
'python3-tzdata'
'python3-time-machine'
)
deps_fedora=("${deps[@]}")
deps_redos=("${deps[@]}")
deps_rhel=("${deps[@]}")
deps_rosa=("${deps[@]}")
build_deps=(
'python3-build'
'python3-installer'
'python3-maturin'
'python3-wheel'
)
build_deps_alt=(
'python3-module-build'
'python3-module-installer'
'python3-module-maturin'
'python3-module-wheel'
)
build_deps_arch=(
'python-build'
'python-installer'
'python-maturin'
'python-wheel'
)
build_deps_debian=("${build_deps[@]}")
build_deps_fedora=("${build_deps[@]}")
build_deps_redos=("${build_deps[@]}")
build_deps_rhel=("${build_deps[@]}")
build_deps_rosa=("${build_deps[@]}")
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/"
}
files() {
files-find "./usr/lib/python3.*/site-packages/pendulum"
files-find "./usr/lib/python3.*/site-packages/pendulum-*.dist-info"
files-find-share "doc"
files-find-share "licenses"
}