mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-20 23:46:14 -04:00
Closes: https://bugs.gentoo.org/805254 Closes: https://bugs.gentoo.org/805251 Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Shaoyu Tseng <shaoyu0209@tuta.io>
58 lines
1.5 KiB
Bash
58 lines
1.5 KiB
Bash
# Copyright 1999-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
PYTHON_COMPAT=( python3_{8..9} )
|
|
inherit python-r1
|
|
|
|
QA_PREBUILT="usr/lib/*"
|
|
DESCRIPTION="Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
|
|
HOMEPAGE="https://github.com/ijl/orjson"
|
|
|
|
# As per PEP 600 manylinux platform tag specfication, a wheel tagged
|
|
# manylinux_x_y should work with systems with >=glibc-x.y , and on Python
|
|
# versions 3.8 to 3.10
|
|
SRC_URI="
|
|
amd64? (
|
|
https://files.pythonhosted.org/packages/cp310/${P:0:1}/${PN%%-bin}/${P//-bin}-cp310-cp310-manylinux_2_24_x86_64.whl
|
|
-> ${P}-amd64.zip
|
|
)
|
|
arm64? (
|
|
https://files.pythonhosted.org/packages/cp310/${P:0:1}/${PN%%-bin}/${P//-bin}-cp310-cp310-manylinux_2_24_aarch64.whl
|
|
-> ${P}-arm64.zip
|
|
)
|
|
"
|
|
LICENSE="Apache-2.0"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm64"
|
|
|
|
RESTRICT="!test? ( test )"
|
|
IUSE="test"
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
|
|
BDEPEND="app-arch/unzip"
|
|
RDEPEND="${PYTHON_DEPS}"
|
|
|
|
pkg_setup() {
|
|
python_setup
|
|
}
|
|
|
|
S="${WORKDIR}"
|
|
|
|
src_install() {
|
|
if use amd64; then
|
|
ARCH="x86_64"
|
|
elif use arm64; then
|
|
ARCH="aarch64"
|
|
fi
|
|
do_install() {
|
|
insinto "$(python_get_sitedir)"
|
|
# Even though the soname is compatible, the python version has to be
|
|
# corrected in order for it to work
|
|
newins ${PN//-bin}.cpython-310-${ARCH}-linux-gnu.so ${PN//-bin}.cpython-3${EPYTHON##python3.}-${ARCH}-linux-gnu.so
|
|
python_domodule ${P//-bin}.dist-info
|
|
}
|
|
python_foreach_impl do_install
|
|
}
|