dev-python/orjson-bin: new package

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Shaoyu Tseng <shaoyu0209@tuta.io>
This commit is contained in:
Shaoyu Tseng
2021-07-29 18:11:22 +08:00
parent f5e9e26150
commit 9c308e990a
3 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST orjson-bin-3.6.0_aarch64.zip 218609 BLAKE2B 880852a268f833b906bb6ef1cd7c9f2f40fe6ce043f52a8a7bdf965b4274a2ac0c215849b55da994f8bb328b903bc4a6a9414d0c3f16cb1a9be4f5c029e5b632 SHA512 70382465c3676fe3722688e0c223de3c86bb4555c1c996dd586aa782a3ecd3f6003a5c0f4154bfe90c18b2d4027b0a2c169b97315206e656a48557a5415eabd2
DIST orjson-bin-3.6.0_x86_64.zip 235974 BLAKE2B 8d80d7b40fa87be2b5a6b25840c02392e411dbce45247e46ebbfef94c15fd9e1596ba7ac6a40a53dde775f68d82b6c66c7350b392ce0f07ad92bb6ae65455767 SHA512 e80a7e0c785d6927a1d971553d04fca75e4b13fe5fb099ab362465cdfea69e911918ce94a480e9fead564a795f4a96a594918f4326e407f015b7d3c00ff08764

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="person">
<email>shaoyu0209@tuta.io</email>
<name>Shaoyu Tseng</name>
</maintainer>
<upstream>
<remote-id type="pypi">orjson</remote-id>
<remote-id type="github">ijl/orjson</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,48 @@
# 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 python-utils-r1
MY_PN=${PN//-bin/}
MY_P=${MY_PN}-${PV}
DESCRIPTION="Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
HOMEPAGE="https://github.com/ijl/orjson"
SRC_URI="
amd64? (
https://files.pythonhosted.org/packages/cp310/${P:0:1}/${MY_PN}/${MY_P}-cp310-cp310-manylinux_2_24_x86_64.whl -> ${P}_x86_64.zip
)
arm64? (
https://files.pythonhosted.org/packages/cp310/${P:0:1}/${MY_PN}/${MY_P}-cp310-cp310-manylinux_2_24_aarch64.whl -> ${P}_aarch64.zip
)
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="test"
S="${WORKDIR}/"
pkg_setup() {
python_setup
}
src_install(){
insinto "$(python_get_sitedir)"
if use amd64; then
doins orjson.cpython-310-x86_64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-x86_64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-39-x86_64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-x86_64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-38-x86_64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-x86_64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-37-x86_64-linux-gnu.so
elif use arm64; then
doins orjson.cpython-310-aarch64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-aarch64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-39-aarch64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-aarch64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-38-aarch64-linux-gnu.so
dosym $(python_get_sitedir)/orjson.cpython-310-aarch64-linux-gnu.so $(python_get_sitedir)/orjson.cpython-37-aarch64-linux-gnu.so
fi
}