Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910661 - distutils-r1.eclass: Inconsistency in BUILD_DIR eclass documentation in inherited python eclasses leads to false IndirectInherits warning in pkgcheck with DISTUTILS_SINGLE_IMPL=1
Summary: distutils-r1.eclass: Inconsistency in BUILD_DIR eclass documentation in inher...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-22 02:39 UTC by Alfred Wingate
Modified: 2024-06-14 12:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred Wingate 2023-07-22 02:39:27 UTC
Inconsistent eclass documentation has BUILD_DIR documented in python-r1.eclass but not python-single-r1.eclass.

Reproducible: Always

Steps to Reproduce:
1. Use distutils-r1
2. Set DISTUTILS_SINGLE_IMPL=1
3. Use BUILD_DIR in ebuild
Actual Results:  
Warning about IndirectInherits

Expected Results:  
No warning
Comment 1 Alfred Wingate 2023-07-22 02:40:48 UTC
Ebuilds to reproduce the warning

~ cat test-1.ebuild 
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3 python3_{11..12} )

inherit distutils-r1

DESCRIPTION="lorem ipsum"
HOMEPAGE="http://example.com/"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64"

distutils_enable_tests pytest

python_test() {
        echo "${BUILD_DIR}"
}

$ cat test-2.ebuild 
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3 python3_{11..12} )

inherit distutils-r1

DESCRIPTION="lorem ipsum"
HOMEPAGE="http://example.com/"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64"

distutils_enable_tests pytest

python_test() {
        echo "${BUILD_DIR}"
}
Comment 2 Alfred Wingate 2023-07-22 02:43:53 UTC
My own opinion on this is that documenting BUILD_DIR in python-utils-r1.eclass instead would make the most sense, especially as the eclass has some mention of the variable already while not documenting it twice for the same purpose.
Comment 3 Alfred Wingate 2023-07-22 02:45:39 UTC
And just to make it clear as I have omitted it in the initial comment. 

The warning comes from pkgcheck, so to reproduce it the fourth step would be to run pkgcheck scan.
Comment 4 Larry the Git Cow gentoo-dev 2024-06-14 12:26:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9973d691bf1842f7a1fcefc90e31872054bc94

commit 4c9973d691bf1842f7a1fcefc90e31872054bc94
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-06-01 09:22:32 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-06-14 12:26:06 +0000

    distutils-r1.eclass: Document BUILD_DIR for consistency
    
    Closes: https://bugs.gentoo.org/910661
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/distutils-r1.eclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)