Bug 685134

Summary: python-distutils-extra cannot be used for building packages that 'import gtk'
Product: [Fedora] Fedora Reporter: Michel Lind <michel>
Component: python-distutils-extraAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: mail
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-distutils-extra-2.26-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 07:00:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patches auto.py to skip test of whether gtk is an external module none

Description Michel Lind 2011-03-15 11:42:31 UTC
Created attachment 484441 [details]
Patches auto.py to skip test of whether gtk is an external module

Description of problem:
Python programs that use python-distutils-extra to manage their build and installation process cannot currently be built on RPM builders (e.g. rpm-build) because DISPLAY will be unset, while distutils-extra's automatic dependency tracker would attempt to import every module used by the package to classify which of the dependencies are internal, and which external.

This unfortunately would fail since 'import gtk' throws a runtime exception without a working display. The patch attached (for distutils-extra 0.22) fixes that by short-circuiting the test, marking gtk an external module without testing it.

Version-Release number of selected component (if applicable):
python-distutils-extra-2.22-2.fc15.noarch

How reproducible:
Always


Steps to Reproduce:
1. Try building, say, the Dexter source, without DISPLAY set
   https://launchpad.net/dexter-rolodex
  
Actual results:
Fails when gtk is imported


Expected results:
Should just work

Additional info:

Comment 1 Michel Lind 2011-03-15 11:43:51 UTC
ps: I subscribed python-distutils-extra for upstream release monitoring; a new bug should automatically be opened today about version 2.26 being available. I've not checked whether it fixes this issue, probably not.

Comment 2 Fabian Affolter 2011-03-16 23:28:00 UTC
I will add the patch. Thanks.

Comment 3 Fedora Update System 2011-03-16 23:29:45 UTC
python-distutils-extra-2.26-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/python-distutils-extra-2.26-1.fc14

Comment 4 Fedora Update System 2011-03-16 23:29:56 UTC
python-distutils-extra-2.26-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/python-distutils-extra-2.26-1.fc15

Comment 5 Fedora Update System 2011-03-25 06:59:57 UTC
python-distutils-extra-2.26-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-04-02 22:50:25 UTC
python-distutils-extra-2.26-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.