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

128 lines
2.6 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='orjson'
name='python3-orjson'
version='3.11.3'
release='2'
desc="Fast, correct Python JSON library supporting dataclasses and datetimes"
desc_ru='Быстрая библиотека Python JSON с поддержкой dataclasses и datetime'
homepage='https://github.com/ijl/orjson'
maintainer='Evgeny Khramov <xpamych@yandex.ru>'
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
architectures=('amd64')
license=(
'Apache-2.0'
'MIT'
)
deps=(
'gcc-libs'
'glibc'
'python3'
)
deps_alt=(
'libgcc'
'glibc-core'
'python3'
)
deps_arch=(
'gcc-libs'
'glibc'
'python'
)
deps_debian=(
'libgcc-s1'
'libc6'
'python3'
)
deps_fedora=(
'libgcc'
'glibc'
'python3'
)
deps_redos=("${deps_fedora[@]}")
deps_rhel=("${deps_fedora[@]}")
deps_rosa=("${deps_fedora[@]}")
build_deps=(
'maturin'
'python3-maturin'
'python3-installer'
'rust'
'python3-arrow'
'python3-pendulum'
'python3-psutil'
'python3-pytest'
'python3-pytz'
'python3-xxhash'
)
build_deps_alt=(
'maturin'
'python3-module-maturin'
'python3-module-installer'
'rust'
'python3-module-arrow'
'python3-module-pendulum'
'python3-module-psutil'
'python3-module-pytest'
'python3-module-pytz'
'python3-module-xxhash'
)
build_deps_arch=(
'maturin'
'python-maturin'
'python-installer'
'rust'
'python-arrow'
'python-pendulum'
'python-psutil'
'python-pytest'
'python-pytz'
'python-xxhash'
)
build_deps_debian=(
'maturin'
'python3-maturin'
'python3-installer'
'rustc'
'python3-arrow'
'python3-pendulum'
'python3-psutil'
'python3-pytest'
'python3-pytz'
'python3-xxhash'
)
build_deps_fedora=("${build_deps[@]}")
build_deps_redos=("${build_deps[@]}")
build_deps_rhel=("${build_deps[@]}")
build_deps_rosa=("${build_deps[@]}")
sources=("https://github.com/ijl/orjson/archive/${version}/$_name-${version}.tar.gz")
checksums=('SKIP')
build() {
cd $_name-${version}
maturin build --release --strip
}
check() {
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd $_name-${version}
python -m installer --destdir=test_dir target/wheels/*.whl
export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
pytest -vv
}
package() {
cd $_name-${version}
python -m installer --destdir="$pkgdir" target/wheels/*.whl
install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$name/"
install -vDm 644 LICENSE-* -t "$pkgdir/usr/share/licenses/$name/"
}
files() {
files-find "./usr/lib/python3.*/site-packages/orjson"
files-find "./usr/lib/python3.*/site-packages/orjson-*.dist-info"
files-find-share "doc"
files-find-share "licenses"
}