Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 926964

Summary: distutils-r1.eclass: distutils_enable_tests unittest with only Python 3.12 in PYTHON_COMPAT
Product: Gentoo Linux Reporter: Sam James <sam>
Component: EclassesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, mgorny
Priority: Normal Keywords: NeedPatch, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/35913
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: pyasyncore-1.0.4.ebuild

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-14 04:12:59 UTC
Created attachment 887566 [details]
pyasyncore-1.0.4.ebuild

When packaging dev-python/pyasyncore (attached), I hit this:
```
$ ebuild pyasyncore-1.0.4.ebuild clean test install
Appending /home/sam/git/gentoo to PORTDIR_OVERLAY...
Forcing test.
Error(s) in metadata for 'dev-python/pyasyncore-1.0.4':
  BDEPEND: expected: dependency string, got: ')', token 2
```

Indeed, BDEPEND is invalid:
```
 test? (

                         )
```
Comment 1 Ionen Wolkens gentoo-dev 2024-03-14 05:06:04 UTC
Had dropped a note to mgorny about this on #gentoo-python but guess we both kind of forgot about it, should've filed a bug.

I hit this while experimenting with zombie-imp too[1] given had made it 3.12-only. Albeit distutils_enable_tests was essentially a no-op given I defined python_test either way.

[1] https://github.com/ionenwks/gentoo/blob/dd89ee08/dev-python/zombie-imp/zombie-imp-0.0.2.ebuild#L18
Comment 2 Larry the Git Cow gentoo-dev 2024-04-01 09:40:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0168114f8343530be3e879828eb6fa559aa8f936

commit 0168114f8343530be3e879828eb6fa559aa8f936
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-25 18:47:39 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-04-01 09:36:33 +0000

    distutils-r1.eclass: Fix `det unittest` with 3.12 only
    
    Closes: https://bugs.gentoo.org/926964
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/distutils-r1.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)