[gentoo-dev] [PATCH 4/4] dev-python/tomli: Use pypi.eclass

2023-02-05 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 dev-python/tomli/tomli-2.0.1-r1.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dev-python/tomli/tomli-2.0.1-r1.ebuild 
b/dev-python/tomli/tomli-2.0.1-r1.ebuild
index 8a65a1c1633a..0dca726d29eb 100644
--- a/dev-python/tomli/tomli-2.0.1-r1.ebuild
+++ b/dev-python/tomli/tomli-2.0.1-r1.ebuild
@@ -7,7 +7,7 @@ EAPI=7
 DISTUTILS_USE_PEP517=no
 PYTHON_COMPAT=( python3_{9..11} pypy3 )
 
-inherit distutils-r1
+inherit distutils-r1 pypi
 
 DESCRIPTION="A lil' TOML parser"
 HOMEPAGE="
@@ -17,8 +17,7 @@ HOMEPAGE="
 SRC_URI="
https://github.com/hukkin/tomli/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
-   
https://files.pythonhosted.org/packages/py3/${PN::1}/${PN}/${P}-py3-none-any.whl
-   -> ${P}-py3-none-any.whl.zip
+   $(pypi_wheel_url --unpack)
 "
 
 LICENSE="MIT"
-- 
2.39.1




[gentoo-dev] [PATCH 3/4] dev-python/installer: Use pypi.eclass

2023-02-05 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 dev-python/installer/installer-0.6.0.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dev-python/installer/installer-0.6.0.ebuild 
b/dev-python/installer/installer-0.6.0.ebuild
index 5310b5520a29..fcb3784df3fd 100644
--- a/dev-python/installer/installer-0.6.0.ebuild
+++ b/dev-python/installer/installer-0.6.0.ebuild
@@ -7,7 +7,7 @@ EAPI=7
 DISTUTILS_USE_PEP517=no
 PYTHON_COMPAT=( python3_{9..11} pypy3 )
 
-inherit distutils-r1
+inherit distutils-r1 pypi
 
 DESCRIPTION="A library for installing Python wheels"
 HOMEPAGE="
@@ -18,8 +18,7 @@ HOMEPAGE="
 SRC_URI="
https://github.com/pypa/installer/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
-   
https://files.pythonhosted.org/packages/py3/${PN::1}/${PN}/${P%_p*}-py3-none-any.whl
-   -> ${P%_p*}-py3-none-any.whl.zip
+   $(pypi_wheel_url --unpack)
 "
 
 LICENSE="MIT"
-- 
2.39.1




[gentoo-dev] [PATCH 2/4] pypi.eclass: Permit EAPI 7

2023-02-05 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/pypi.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass
index ea57b2345502..e9d3eec1268b 100644
--- a/eclass/pypi.eclass
+++ b/eclass/pypi.eclass
@@ -6,7 +6,7 @@
 # Michał Górny 
 # @AUTHOR:
 # Michał Górny 
-# @SUPPORTED_EAPIS: 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: A helper eclass to generate PyPI source URIs
 # @DESCRIPTION:
 # The pypi.eclass can be used to easily obtain URLs for artifacts
@@ -27,7 +27,7 @@
 # @CODE@
 
 case ${EAPI} in
-   8) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-- 
2.39.1




[gentoo-dev] [PATCH 1/4] pypi.eclass: Support --unpack in pypi_wheel_url

2023-02-05 Thread Michał Górny
Add a handy `--unpack` option to pypi_wheel_url, that automatically
renames the downloaded distfile to have .zip suffix.  This is used
e.g. in dev-python/installer and dev-python/tomli to have
default_src_unpack unpack the wheels automatically.

Signed-off-by: Michał Górny 
---
 eclass/pypi.eclass | 26 +++---
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass
index e11999fc7e9c..ea57b2345502 100644
--- a/eclass/pypi.eclass
+++ b/eclass/pypi.eclass
@@ -89,10 +89,16 @@ pypi_wheel_name() {
 }
 
 # @FUNCTION: pypi_wheel_url
-# @USAGE: [ [ [ [
+# @USAGE: [--unpack] [ [ [ 
[
 # @DESCRIPTION:
 # Output the URL to PyPI wheel for specified project/version tuple.
 #
+# The `--unpack` option causes a SRC_URI with an arrow operator to
+# be generated, that adds a .zip suffix to the fetched distfile,
+# so that it is unpacked in default src_unpack().  Note that
+# the wheel contents will be unpacked straight into ${WORKDIR}.
+# You need to add a BDEPEND on app-arch/unzip.
+#
 # If  is unspecified, it defaults to ${PN}.
 #
 # If  is unspecified, it defaults to ${PV}.
@@ -103,21 +109,27 @@ pypi_wheel_name() {
 # If  is unspecified, it defaults to "none-any".
 # You need to specify the correct value for non-pure wheels,
 # e.g. "abi3-linux_x86_64".
-#
-# Note that wheels are suffixed .whl by default and therefore are not
-# unpacked automatically.  If you need automatic unpacking, use "->"
-# operator to rename it or call unzip directly.  Remember to BDEPEND
-# on app-arch/unzip.
 pypi_wheel_url() {
+   local unpack=
+   if [[ ${1} == --unpack ]]; then
+   unpack=1
+   shift
+   fi
+
if [[ ${#} -gt 4 ]]; then
die "Usage: ${FUNCNAME}  [ [ 
[]]]"
fi
 
+   local filename=$(pypi_wheel_name "${@}")
local project=${1-"${PN}"}
local version=${2-"${PV}"}
local pytag=${3-py3}
printf "https://files.pythonhosted.org/packages/%s; \
-   "${pytag}/${project::1}/${project}/$(pypi_wheel_name "${@}")"
+   "${pytag}/${project::1}/${project}/${filename}"
+
+   if [[ ${unpack} ]]; then
+   echo " -> ${filename}.zip"
+   fi
 }
 
 fi
-- 
2.39.1




[gentoo-dev] [PATCH] profiles: last-rite jspeex, osgi-annotation-versioning

2023-02-05 Thread Volkmar W. Pogatzki
Signed-off-by: Volkmar W. Pogatzki 
---
 profiles/package.mask | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/profiles/package.mask b/profiles/package.mask
index bfd6d6821b96..22cd5077f051 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -33,6 +33,12 @@
 
 #--- END OF EXAMPLES ---
 
+# Volkmar W. Pogatzki  (2023-02-05)
+# Unused Java libraries. Removal on 2023-03-07.
+# jspeex had last upstream activities in 2005.
+dev-java/jspeex
+dev-java/osgi-annotation-versioning
+
 # Michał Górny  (2023-02-05)
 # dev-python/python-box has broken build system that prevents us from
 # bumping it.  Its only used by dev-python/tavern that is last rited,
-- 
2.39.1




[gentoo-dev] Last rites: dev-python/python-box, dev-python/tavalidate

2023-02-05 Thread Michał Górny
# Michał Górny  (2023-02-05)
# dev-python/python-box has broken build system that prevents us from
# bumping it.  Its only used by dev-python/tavern that is last rited,
# and dev-python/tavalidate that no longer has any revdeps.
# Removal on 2023-03-07.
dev-python/python-box
dev-python/tavalidate

-- 
Best regards,
Michał Górny