Files
guru/dev-python/orjson-bin/orjson-bin-3.6.4.ebuild
T

57 lines
1.5 KiB
Bash
Raw Normal View History

2021-07-29 18:11:22 +08:00
# 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
2021-07-29 18:11:22 +08:00
2021-08-08 12:11:20 +08:00
QA_PREBUILT="usr/lib/*"
2021-07-29 18:11:22 +08:00
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
2021-07-29 18:11:22 +08:00
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
2021-07-29 18:11:22 +08:00
)
arm64? (
https://files.pythonhosted.org/packages/cp310/${P:0:1}/${PN%%-bin}/${P//-bin}-cp310-cp310-manylinux_2_24_aarch64.whl
-> ${P}-arm64.zip
2021-07-29 18:11:22 +08:00
)
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RESTRICT="!test? ( test )"
2021-07-29 18:11:22 +08:00
IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
BDEPEND="app-arch/unzip"
RDEPEND="${PYTHON_DEPS}"
2021-07-29 18:11:22 +08:00
pkg_setup() {
python_setup
}
S="${WORKDIR}"
src_install() {
2021-07-29 18:11:22 +08:00
if use amd64; then
ARCH="x86_64"
2021-07-29 18:11:22 +08:00
elif use arm64; then
ARCH="aarch64"
2021-07-29 18:11:22 +08:00
fi
2021-07-31 16:14:36 +08:00
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
2021-10-17 12:43:24 -04:00
newins orjson/${PN//-bin}.cpython-310-${ARCH}-linux-gnu.so ${PN//-bin}.cpython-3${EPYTHON##python3.}-${ARCH}-linux-gnu.so
2021-07-31 16:14:36 +08:00
python_domodule ${P//-bin}.dist-info
}
python_foreach_impl do_install
2021-07-29 18:11:22 +08:00
}