Support use of distutils-extra on systems without DISPLAY
Bug #735408 reported by
Michel Lind
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dexter - Old |
Invalid
|
Undecided
|
Unassigned | ||
python-distutils-extra |
Fix Released
|
Undecided
|
Unassigned | ||
python-distutils-extra (Fedora) |
Fix Released
|
Medium
|
Bug Description
RPM-based builders tend to build packages with DISPLAY unset; this works fine for most Python modules, but 'gtk' would throw a RuntimeError without access to a working display. Alas, distutils-extra automatically compiles a list of requirements by trying to import them, and this would fail.
The following patch (against distutils) creates a special case for gtk. It's made against distutils-extra 0.22 (latest in Fedora currently), will rebase to 0.26. Do you have a preferred patch format?
Related branches
lp:~dobey/python-distutils-extra/auto-nodisplay
- Martin Pitt (community): Approve
-
Diff: 12 lines (+2/-0)1 file modifiedDistUtilsExtra/auto.py (+2/-0)
Changed in python-distutils-extra (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
To post a comment you must log in.
Created attachment 484441
Patches auto.py to skip test of whether gtk is an external module
Description of problem: 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.
Python programs that use python-
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): distutils- extra-2. 22-2.fc15. noarch
python-
How reproducible:
Always
Steps to Reproduce: /launchpad. net/dexter- rolodex
1. Try building, say, the Dexter source, without DISPLAY set
https:/
Actual results:
Fails when gtk is imported
Expected results:
Should just work
Additional info: