Opened 11 years ago

Closed 10 years ago

#40207 closed enhancement (fixed)

py-pyface: use proper variant(s) for wxPython

Reported by: jjstickel (Jonathan Stickel) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: wxwidgets haspatch Cc: mojca (Mojca Miklavec), petrrr
Port: py-pyface

Description (last modified by mojca (Mojca Miklavec))

Removing wx variant from py-pyface until wxwidgets/wxpython issues get sorted out. See #38375. Patch attached. Note that py-pyface is a graphical backend dependency for several Enthought ports including py-mayavi.

See also #40333.

Attachments (4)

py-pyface_Portfile.diff (838 bytes) - added by jjstickel (Jonathan Stickel) 11 years ago.
py-pyface_Portfile.2.diff (2.1 KB) - added by jjstickel (Jonathan Stickel) 10 years ago.
py-pyface_Portfile.3.diff (2.2 KB) - added by jjstickel (Jonathan Stickel) 10 years ago.
py-pyface.Portfile.4 (2.4 KB) - added by mojca (Mojca Miklavec) 10 years ago.

Download all attachments as: .zip

Change History (27)

Changed 11 years ago by jjstickel (Jonathan Stickel)

Attachment: py-pyface_Portfile.diff added

comment:1 Changed 11 years ago by mojca (Mojca Miklavec)

Do you need a revision increase for this?

comment:2 Changed 11 years ago by jjstickel (Jonathan Stickel)

Hmm, hadn't thought about it. I don't think so -- if someone is successfully using the wx variant, they might as well continue. But maybe that would break when you commit your changes to the wx ports, so maybe yes. Your call.

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

Just to clarify things a bit ...

My main question is: do you plan to keep support for wxWidgets in the future?

If you plan to remove support for wxWidgets, I can easily commit the change now.

But if you would like to keep the option, there is no urgency to remove the option just for the sake of easier transition (even though I can also do that if you are ok with it and if you have no time to test). If you plan to keep support, the best thing to do would be to test the port now. The main question is whether the port is compatible with wxWidgets 2.9. In case it is, the situation is trivial - the dependency gets switched to py${python.version}-wxpython-3.0 and that's all. In case it is not, an additional variant might be needed to distinguish between dependencies on wxWidgets 2.8 and wxGTK 2.8.

There is one more thing I noticed now. All the port does is depend on wxpython. Shouldn't the port disable wxpython support when wxpython is installed, but the variant is not selected?

comment:4 in reply to:  3 Changed 11 years ago by jjstickel (Jonathan Stickel)

Replying to mojca@…:

Just to clarify things a bit ...

My main question is: do you plan to keep support for wxWidgets in the future? The main question is whether the port is compatible with wxWidgets 2.9. In case it is, the situation is trivial - the dependency gets switched to py${python.version}-wxpython-3.0 and that's all. In case it is not, an additional variant might be needed to distinguish between dependencies on wxWidgets 2.8 and wxGTK 2.8.

From what I can tell, and what I experienced the last time I tested, Enthought software is not compatible with wx-2.9. This may change with 3.0, but I don't know for sure. If it does work with 3.0, then the variant should exist.

There is one more thing I noticed now. All the port does is depend on wxpython. Shouldn't the port disable wxpython support when wxpython is installed, but the variant is not selected?

Yes, you are right about this. If wxpython is around, py-pyface tries to use it even if pyqt4 is installed. This should be fixed, but I don't have much time to investigate.

comment:5 Changed 11 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed
Version: 2.2.0

r110279. The wxWidgets transition is done. Feel free to submit whatever patch is needed to keep the port working in the desired way.

comment:6 Changed 11 years ago by su1shi4fu3@…

Resolution: fixed
Status: closedreopened

Hi, I just commented in the previously removed "wx" variant like this:

 variant wx description {Use wxWidgets backend} {
     if {$subport != $name} {
         depends_lib-append      port:py${python.version}-wxpython-2.8
     }
 }

(Didn't change anything but the commenting...) because I needed the port in the "wx" variant to build py27-mayavi. This might be of general interest.

comment:7 Changed 11 years ago by mojca (Mojca Miklavec)

  • Do you have any thoughts about #40333?
  • Are you willing to investigate how to avoid opportunistic use of wxPython? (Even when wx is disabled and you have wxPython installed, it will use wxPython)
  • Can you please tell me how to test this wx?
  • I wanted to ask if wxPython 2.9 works, but I saw https://github.com/enthought/traitsui/issues/106

I have no problem uncommenting this again, you only need to be aware that until someone suggests a proper solution for #40333, this wx option will be conditionally broken.

comment:8 in reply to:  7 Changed 11 years ago by jjstickel (Jonathan Stickel)

Replying to mojca@…:

  • Do you have any thoughts about #40333?
  • Are you willing to investigate how to avoid opportunistic use of wxPython? (Even when wx is disabled and you have wxPython installed, it will use wxPython)

Sorry, I am very busy at work and at home right now, and don't have the time to dig deep into these issues.

  • Can you please tell me how to test this wx?

I am not quite sure what you are asking. To test pyXX-pyface, I usually also install pyXX-mayavi and run it.

Right, wxpython-2.9 does not work with pyface (at least not yet). Enought developers seem to have put this as a low priority, considering that pyqt4 works well.

I have no problem uncommenting this again, you only need to be aware that until someone suggests a proper solution for #40333, this wx option will be conditionally broken.

Fine with me, too. At a minimum, a message could be displayed about using compatible variants for wxwidgets/wxpython.

comment:9 Changed 10 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:10 Changed 10 years ago by mojca (Mojca Miklavec)

comment:11 Changed 10 years ago by mojca (Mojca Miklavec)

Description: modified (diff)
Summary: remove wx variant from py-pyfacepy-pyface: use proper variant(s) for wxPython

comment:12 Changed 10 years ago by jjstickel (Jonathan Stickel)

I tested wx-3.0 with pyface (via mayavi), and it is unstable. I suggest we leave the variant commented out. I reported the issue upstream on the ticket indicated.

There is an update for pyface, and I have uploaded a patch to #42059.

comment:13 Changed 10 years ago by jjstickel (Jonathan Stickel)

Documentation is sparse, but I think py-enable should also have a wxpython variant. For the record, a patch to py-enable with lines copied from py-pyface is given in #42075.

Changed 10 years ago by jjstickel (Jonathan Stickel)

Attachment: py-pyface_Portfile.2.diff added

Changed 10 years ago by jjstickel (Jonathan Stickel)

Attachment: py-pyface_Portfile.3.diff added

comment:14 Changed 10 years ago by jjstickel (Jonathan Stickel)

How about the most recent edits to the portfile that are attached (*.3.diff)? I understand now that wxpython, pyqt4, and pyside do not necessarily conflict, and the user may select which backend to use (see the new note). If you like this, I will make these changes to py-enable as well and create a new ticket for it.

comment:15 Changed 10 years ago by mojca (Mojca Miklavec)

I believe the following would be the complete solution:

variant wxwidgets30 conflicts wxwidgets28 wxgtk28 description {Use wxWidgets-3.0 Cocoa backend (experimental)} {
    depends_lib-append      port:py${python.version}-wxpython-3.0
    notes-append "Warning: wxpython-3.0 is not fully compatible with pyface, but the wxwidgets variant exists for testing and future use.\n"
}

variant wxwidgets28 conflicts wxwidgets30 wxwidgets28 description {Use 32-bit wxWidgets-2.8 Carbon backend} {
    universal_variant       no
    supported_archs         i386 ppc
    depends_lib-append      port:py${python.version}-wxpython-2.8
    require_active_variants port:py${python.version}-wxpython-2.8 carbon gtk
}

variant wxgtk28 conflicts wxwidgets30 wxwidgets28 description {Use wxWidgets-2.8 GTK backend} {
    depends_lib-append      port:py${python.version}-wxpython-2.8
    require_active_variants port:py${python.version}-wxpython-2.8 gtk carbon
}

On the other hand I'm currently thinking that it would probably be best for everyone if I would simply remove py-wxpython-2.8 +carbon. That would make the life easier for everyone. Sure, users of 10.6 and lower who want to run their outdated software (whose maintainers don't care to make it compatible with 3.0) will be forced to use X11 instead of being able to use Carbon, but ... does anyone really care?

Maybe I should make that decision before deciding which variants need to be added.

comment:16 Changed 10 years ago by mojca (Mojca Miklavec)

Type: updateenhancement

comment:17 Changed 10 years ago by jjstickel (Jonathan Stickel)

How about:

    variant wxpython30 conflicts wxpython28 description {Use wxWidgets-3.0 (cocoa) backend} {
        depends_lib-append      port:py${python.version}-wxpython-3.0
        notes-append "Warning: wxpython-3.0 is not fully compatible with pyface, but the wxpython30 variant exists for testing and future use.\n"
    }

    variant wxpython28 conflicts wxpython28 description {Use wxWidgets-2.8 (gtk or carbon) backend} {
        depends_lib-append      port:py${python.version}-wxpython-2.8
    }

This leaves it to the user to properly select the appropriate variant (gtk/carbon) for wxpython-2.8. If gtk is the default variant, then most people will be OK.

comment:18 Changed 10 years ago by mojca (Mojca Miklavec)

Yes, I think I'll do that. I suspect this will fail on the buildbot for 10.6, but I think I'll make GTK default on 10.6.

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: py-pyface.Portfile.4 added

comment:19 Changed 10 years ago by mojca (Mojca Miklavec)

Is this what you want? Just to double-check before committing something that you didn't ask for.

Also: do we really need a revision increase? I don't see any benefit in increasing the revision. If users will merely upgrade without manual intervention, won't they get exactly the same thing after the upgrade?

comment:20 Changed 10 years ago by jjstickel (Jonathan Stickel)

Yes, that looks fine. I probably will not have a chance to test it until Tuesday. I increased the revision so that users would see the note(s).

comment:21 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: reopenedclosed

comment:22 Changed 10 years ago by jjstickel (Jonathan Stickel)

Resolution: fixed
Status: closedreopened

Whoops, you got the wxpython28 variant conflicting with itself (copy-paste error?).

comment:23 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: reopenedclosed

I'm sorry. A fix in r116202.

Note: See TracTickets for help on using tickets.