diff --git a/python3-orjson/alr.sh b/python3-orjson/alr.sh index d022920..1df60b1 100644 --- a/python3-orjson/alr.sh +++ b/python3-orjson/alr.sh @@ -1,19 +1,47 @@ _name='orjson' name='python3-orjson' version='3.11.3' -release='1' +release='2' desc="Fast, correct Python JSON library supporting dataclasses and datetimes" -homepage="https://github.com/ijl/orjson" +desc_ru='Быстрая библиотека Python JSON с поддержкой dataclasses и datetime' +homepage='https://github.com/ijl/orjson' +maintainer='Evgeny Khramov ' +maintainer_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' @@ -26,26 +54,74 @@ build_deps=( 'python3-pytz' 'python3-xxhash' ) -sources=(https://github.com/ijl/orjson/archive/version/$_name-version.tar.gz) + +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 + cd $_name-${version} maturin build --release --strip } check() { local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - cd $_name-version + 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 + 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" +}