[John Porter <jporter@...309...>] 3D plotting

  IMO rpm is right and the test is wrong. It does not make

    > any sense to require a running X just to check that pygtk is
    > installed.

In principle, I certainly agree with you. In practice, I think this
is harder than it sounds, because several of us have tried to make a
build/configure system that 1) works and 2) doesn't require X, and
obviously we have failed. Whle it certainly must be possible, we
clearly haven't found the right apporaches for GTK* and Tk*.

    >> The mysterious part is why bdist_rpm /used/ to work for mpl as
    >> of 0.83.2. It could be either that a change in mpl's build
    >> made it more sensitive to X11 issues than before, or that
    >> Fedora3 updated its rpm build scripts between those days and
    >> today, and that now they do this 'unset DISPLAY'. But given
    >> that on Ubuntu and Mandriva it's working OK, I wouldn't worry
    >> too much about it. Having that feedback was a good outcome of
    >> this thread, even if I can't upgrade in our lab :slight_smile:

    > The usual trick in rpms it to require a nest X to test for
    > pygtk.

I'm not sure I understand this. We have the following

if BUILD_GTK:
    try:
        import gtk
    except ImportError:
        print 'GTK requires pygtk'
        BUILD_GTK=0
    except RuntimeError:
        print 'pygtk present but import failed'

The ImportError is designed to catch the case where pygtk is not
present and the RuntimeError is designed to warn but not fail if X is
not present. I'll do some testing tonight to see if I can isolate
where this is failing.

JDH

    > The usual trick in rpms it to require a nest X to test for
    > pygtk.

I'm not sure I understand this. We have the following

if BUILD_GTK:
    try:
        import gtk
    except ImportError:
        print 'GTK requires pygtk'
        BUILD_GTK=0
    except RuntimeError:
        print 'pygtk present but import failed'

The ImportError is designed to catch the case where pygtk is not
present and the RuntimeError is designed to warn but not fail if X is
not present. I'll do some testing tonight to see if I can isolate
where this is failing.

  I see what you mean. It makes sense. :slight_smile:
  I was talking about using xnest to make that code pass the test.
Clearly your approach is more appropriate. :slight_smile:

···

On 18/03/06, John Hunter <jdhunter@...5...> wrote:

JDH

--
José Abílio