Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2124281

Summary: setup.cfg: entry_points keys are lowercased
Product: Red Hat Enterprise Linux 9 Reporter: Miro Hrončok <mhroncok>
Component: python-setuptoolsAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, cstratak, jwboyer, lbalhar, torsava
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-setuptools-53.0.0-11.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:14:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2047823    

Description Miro Hrončok 2022-09-05 13:58:17 UTC
Description of problem:
See https://github.com/pypa/setuptools/issues/1937

I'd like to backport the fix for this:
https://github.com/pypa/setuptools/pull/2580


Version-Release number of selected component: 53.0.0-10.el9


Steps to Reproduce:
1. Try to build the ipython package from rawhide on epel9.
https://src.fedoraproject.org/rpms/ipython/tree/9473367fe84dc2a9a3371219ebf405acd2a8ef35

Actual results:
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'            
running build                                                                   
running build_py                                                                
checking package data                                                           
Traceback (most recent call last):                                              
  File "/builddir/build/BUILD/ipython-8.0.1/setup.py", line 185, in <module>    
    setup(**setup_args)                                                         
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in
setup                        
    return distutils.core.setup(**attrs)                                        
  File "/usr/lib64/python3.9/distutils/core.py", line 148, in setup             
    dist.run_commands()                                                         
  File "/usr/lib64/python3.9/distutils/dist.py", line 966, in run_commands      
    self.run_command(cmd)                                                       
  File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command       
    cmd_obj.run()                                                               
  File "/usr/lib64/python3.9/distutils/command/build.py", line 135, in run      
    self.run_command(cmd_name)                        
  File "/usr/lib64/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)                                      
  File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command       
    cmd_obj.run()
  File "/builddir/build/BUILD/ipython-8.0.1/setupbase.py", line 132, in run     
    check_package_data(self.package_data)                                       
  File "/builddir/build/BUILD/ipython-8.0.1/setupbase.py", line 120, in
check_package_data                  
    assert len(glob(path)) > 0, "No files match pattern %s" % path              
AssertionError: No files match pattern ipython/core/profile/README*             
error: Bad exit status from /var/tmp/rpm-tmp.6HcrAh (%build)                    
    Bad exit status from /var/tmp/rpm-tmp.6HcrAh (%build)

Expected results:
The build succeeds.

Additional info:

Technically, this might not be 100% backward compatible. Hence I'd like to reach an agreement before backporting it. 
https://src.fedoraproject.org/rpms/ipython/pull-request/43#comment-115177

Comment 1 Lumír Balhar 2022-09-05 14:11:17 UTC
Note that the failing function in IPython is some custom test checking that the package_data in setup.cfg is correctly defined. I think we don't need it and we can patch it out easily. https://github.com/ipython/ipython/blob/4396dd6207f5bb1c310ea897065c0c6e17d5f5b1/setupbase.py#L112-L122

But given that the fix is already implemented in setuptools for quite some time, backporting it is also a solution.

Comment 3 Miro Hrončok 2022-09-07 12:47:56 UTC
Tested by running the added test in %check (careful: tests are disabled by default).

Comment 4 Miro Hrončok 2022-09-07 12:58:25 UTC
Also verified that ipython from rawhide builds fine in epel9-next mock with this installed.

Comment 10 errata-xmlrpc 2023-05-09 08:14:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (python-setuptools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2460