commit:     c26fff39a30acead69441af674c73fab1ebe0713
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 27 18:06:44 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 18:06:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c26fff39

dev-python/rencode: Enable py3.12

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/rencode/Manifest                |  2 +-
 dev-python/rencode/rencode-1.0.6-r3.ebuild | 24 +++++++++++++++---------
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/dev-python/rencode/Manifest b/dev-python/rencode/Manifest
index ae583634e3d7..8bb5414afd6f 100644
--- a/dev-python/rencode/Manifest
+++ b/dev-python/rencode/Manifest
@@ -1 +1 @@
-DIST rencode-1.0.6.tar.gz 25455 BLAKE2B 
def013a569a53e2b2d96b3430c13676810bc5879e565f091dbc44f1ae950b8ec7ca0fa5e35a974432fd71a1bcca5a3f1f18bb2a9f042480167ab50e4f0aba8c3
 SHA512 
f04de4d3a83aed916bdc4b7a8ca772655e9324d0531ee882cb7d2a1e92b397bdcec8497bf02939e0a806886ecc62ed2e7319dfee054dad1b69052157f0959e8f
+DIST rencode-1.0.6.gh.tar.gz 25455 BLAKE2B 
def013a569a53e2b2d96b3430c13676810bc5879e565f091dbc44f1ae950b8ec7ca0fa5e35a974432fd71a1bcca5a3f1f18bb2a9f042480167ab50e4f0aba8c3
 SHA512 
f04de4d3a83aed916bdc4b7a8ca772655e9324d0531ee882cb7d2a1e92b397bdcec8497bf02939e0a806886ecc62ed2e7319dfee054dad1b69052157f0959e8f

diff --git a/dev-python/rencode/rencode-1.0.6-r3.ebuild 
b/dev-python/rencode/rencode-1.0.6-r3.ebuild
index 66a639cc8506..e2cc427220b3 100644
--- a/dev-python/rencode/rencode-1.0.6-r3.ebuild
+++ b/dev-python/rencode/rencode-1.0.6-r3.ebuild
@@ -3,20 +3,29 @@
 
 EAPI=8
 
+DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit distutils-r1
 
 DESCRIPTION="similar to bencode from the BitTorrent project"
-HOMEPAGE="https://github.com/aresch/rencode";
-SRC_URI="https://github.com/aresch/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="
+       https://github.com/aresch/rencode/
+       https://pypi.org/project/rencode/
+"
+SRC_URI="
+       https://github.com/aresch/${PN}/archive/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz
+"
 
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv ~sparc x86 ~amd64-linux ~x86-linux"
 
-BDEPEND="dev-python/cython[${PYTHON_USEDEP}]"
+BDEPEND="
+       dev-python/cython[${PYTHON_USEDEP}]
+"
 
 distutils_enable_tests pytest
 
@@ -28,9 +37,6 @@ PATCHES=(
 )
 
 python_test() {
-       # The C extension ("_rencode") can't be imported from "${S}/rencode"
-       # so we need to cd somewhere else to make sure "rencode" is imported
-       # from ${BUILD_DIR}/lib (thanks to PYTHONPATH).
-       cd "${T}" || die
-       epytest "${S}"
+       rm -rf rencode || die
+       epytest
 }

Reply via email to