python3-orjson 3.11.3-2

This commit is contained in:
2025-09-21 20:22:47 +03:00
parent 657e2efbb8
commit a396311603

View File

@@ -1,19 +1,47 @@
_name='orjson' _name='orjson'
name='python3-orjson' name='python3-orjson'
version='3.11.3' version='3.11.3'
release='1' release='2'
desc="Fast, correct Python JSON library supporting dataclasses and datetimes" 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 <xpamych@yandex.ru>'
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
architectures=('amd64') architectures=('amd64')
license=( license=(
'Apache-2.0' 'Apache-2.0'
'MIT' 'MIT'
) )
deps=( deps=(
'gcc-libs'
'glibc'
'python3'
)
deps_alt=(
'libgcc'
'glibc-core'
'python3'
)
deps_arch=(
'gcc-libs' 'gcc-libs'
'glibc' 'glibc'
'python' '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=( build_deps=(
'maturin' 'maturin'
'python3-maturin' 'python3-maturin'
@@ -26,26 +54,74 @@ build_deps=(
'python3-pytz' 'python3-pytz'
'python3-xxhash' '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') checksums=('SKIP')
build() { build() {
cd $_name-version cd $_name-${version}
maturin build --release --strip maturin build --release --strip
} }
check() { check() {
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") 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 python -m installer --destdir=test_dir target/wheels/*.whl
export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
pytest -vv pytest -vv
} }
package() { package() {
cd $_name-version cd $_name-${version}
python -m installer --destdir="$pkgdir" target/wheels/*.whl python -m installer --destdir="$pkgdir" target/wheels/*.whl
install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$name/" install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$name/"
install -vDm 644 LICENSE-* -t "$pkgdir/usr/share/licenses/$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"
}