dev-python/distro-oem: Add new package

See README.md for details on why we add this package instead of
importing dev-python/distro from gentoo.
This commit is contained in:
Krzesimir Nowak 2021-08-31 14:08:37 +02:00
parent 0f54150fdf
commit 8ff3d67fcb
4 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST distro-1.6.0.tar.gz 69377 BLAKE2B 69119c3acfc12327a55e8b16f4e183fe1b039e965a5432081d83c6e5d0f6367846c403eb34764f2436beec173d3ceaa5265e0e1e7d786d1008e84772426ef049 SHA512 1682a52e617ba440eb0fac28ed653dd3bbc53012e3dc81099d792f088d399c1a6aba62d638e7b50aad88de2cd0935579a0bdd29a9abb5aad9d0c68bd90311268

View File

@ -0,0 +1,4 @@
This package is a hacked-up way to install a distro module for oem
packages to use. It's meant to be used by dev-lang/python-oem, thus
not using any python-specific eclasses and whatnot, to avoid pulling
python dependency into the production image.

View File

@ -0,0 +1,30 @@
# Copyright 2021 Microsoft Corporation
# Distributed under the terms of GNU General Public License v2
EAPI=7
MY_PN='distro'
MY_P="${MY_PN}-${PV}"
DESCRIPTION="OS platform information API"
HOMEPAGE="https://github.com/python-distro/distro"
SRC_URI="${HOMEPAGE}/releases/download/v${PV}/${MY_P}.tar.gz"
LICENSE="Apache-2.0"
KEYWORDS="amd64 arm64"
SLOT="0"
RDEPEND="dev-lang/python-oem"
S="${WORKDIR}/${MY_P}"
src_compile() {
# nothing to do
:
}
src_install() {
# When updating python-oem, remember to update the path below.
insinto "/usr/share/oem/python/$(get_libdir)/python3.6/site-packages"
doins "${S}/distro.py"
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>