Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 705362 - distutils-r1 fails to detect legit entry_points in setup.py due to broken check in _distutils_verify_use_setuptools
Summary: distutils-r1 fails to detect legit entry_points in setup.py due to broken che...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-13 17:52 UTC by Sebastian Pipping
Modified: 2020-01-13 19:32 UTC (History)
1 user (show)

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 Sebastian Pipping gentoo-dev 2020-01-13 17:52:26 UTC
The current check in _distutils_verify_use_setuptools fails to detect this (rather standard) use of "entry_points":

setup([..]
    [..]
    entry_points={
        [..]

due to use of "\s+" in the related regex pattern at https://github.com/gentoo/gentoo/blob/a9c7ab9e889fca7f467c018f1f005876ba544d9c/eclass/distutils-r1.eclass#L450 .

I propose this patch:

--- if grep -E -q -s 'entry_points\s+=' setup.py; then
+++ if grep -E -q -s 'entry_points\s*=' setup.py; then

What do you think?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-13 18:12:32 UTC
Yep, stupid thinko indeed.  Please commit it.
Comment 2 Larry the Git Cow gentoo-dev 2020-01-13 19:00:45 UTC
The bug has been closed via the following commit(s):

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

commit aeefba0eeea1e6f03173331edcc26bf8c2f2a215
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2020-01-13 18:56:12 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2020-01-13 19:00:29 +0000

    distutils-r1.eclass: Fix detection of setuptools entry_points
    
    Closes: https://bugs.gentoo.org/705362
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 eclass/distutils-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Mike Gilbert gentoo-dev 2020-01-13 19:28:34 UTC
(In reply to Larry the Git Cow from comment #2)

Nitpick for future reference: you probably should have used "Reviewed-by" instead of "Signed-off-by" for mgorny. You wrote the patch and committed it, so there is no point in a DCO sign-off from him.

https://www.gentoo.org/glep/glep-0066.html#commit-messages
Comment 4 Sebastian Pipping gentoo-dev 2020-01-13 19:32:02 UTC
(In reply to Mike Gilbert from comment #3)
> (In reply to Larry the Git Cow from comment #2)
> 
> Nitpick for future reference: you probably should have used "Reviewed-by"
> instead of "Signed-off-by" for mgorny. You wrote the patch and committed it,
> so there is no point in a DCO sign-off from him.
> 
> https://www.gentoo.org/glep/glep-0066.html#commit-messages

Good point, thanks!