Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#21994 closed request (fixed)

Add py26-mayavi port

Reported by: jochen@… Owned by: jjstickel@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: macports-dev@…, orbeckst (Oliver Beckstein)
Port: py26-mayavi

Description

Could someone please add a py26-mayavi port?

Would it be as simple as duplicating all the py25-mayavi ports (with python2.6 port group and such...) or are there known problems with mayavi or any of the (many) packages required as dependencies?

Attachments (1)

py26-mayavi_Portfile.diff (1.6 KB) - added by jjstickel@… 14 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 15 years ago by tommccullough-tenica

Due to lack of 64 bit Carbon, the wxpython is a stopping point for snow leopard (using 64 bit). wxWidgets 2.9 is released for the cocoa framework (but the port wxWidgets-devel port doesn't support his as a variant), but wxpython 2.9 is apparently only at the alpha stage. Someone (vince?) has created ports wxWidgets-devel & py26-wxpython-devel (see ticket #21530) which change the framework to cocoa, which should solve these problems for mayavi for snow leopard. I haven't built them, or tested compatibility with mayavi, because these port files are not in the trunk (I don't really know what I'm doing)...a little help?

comment:2 Changed 15 years ago by jochen@…

Ok, thanks for the clarification.

Nevertheless, I've implemented py26-mayavi in r59214, which works for me on SL/32bit, at least for simple tests. So at least a subset of users can enjoy it...

I do recognize the 64 bit issue, and I want a 64 bit version myself, so I would appreciate any enhancements of the new ports;-)

comment:3 Changed 14 years ago by jjstickel@…

I found a solution by compiling vtk5 against x11 and wxwidgets/wxpython against gtk+x11. Please see ticket #24350. I'll attach a patch to the py26-mayavi portfile here. Basically, it removes the check for carbon. Ideally, it should check that py*-wxpython and vtk5 are both built against the same graphics libraries, be it x11(gtk), carbon, or cocoa, but I do not know how to do that.

comment:4 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… added

Cc Me!

comment:5 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… removed

Cc Me!

Changed 14 years ago by jjstickel@…

Attachment: py26-mayavi_Portfile.diff added

comment:6 Changed 14 years ago by jjstickel@…

Another option may be to install vtk5 with cocoa (this is the default of the current port with no variant), and to build mayavi to use py*-pyqt4. Unfortunately, I cannot test this since qt4-mac conflicts with kdelibs3, which I have installed for the use of konqueror.

comment:7 in reply to:  6 ; Changed 14 years ago by mf2k (Frank Schima)

Replying to jjstickel@…:

Unfortunately, I cannot test this since qt4-mac conflicts with kdelibs3, which I have installed for the use of konqueror.

Sure you can. The conflict is only a build conflict. Just run the following:

sudo port deactivate kdelibs3
sudo port clean qt4-mac
sudo port install qt4-mac
sudo port activate kdelibs3

comment:8 in reply to:  7 Changed 14 years ago by jjstickel@…

Replying to macsforever2000@…:

Replying to jjstickel@…:

Unfortunately, I cannot test this since qt4-mac conflicts with kdelibs3, which I have installed for the use of konqueror.

Sure you can. The conflict is only a build conflict.

Obviously I did not notice it was a build conflict... I will try it.

comment:9 Changed 14 years ago by willic3@…

I have managed to build py26-mayavi using the patched portfile above, along with the portfiles and patches for wxWidgets-python and py26-wxpython (http://trac.macports.org/ticket/24350). I also built VTK5 with X11, and I end up with a pure X11 version of mayavi2 that seems to work OK.

I'm running OS X 10.6.3 (64-bit mode) on a MacBook Pro.

Please let me know if you need any more info.

comment:10 in reply to:  9 ; Changed 14 years ago by jeffery.kline@…

Replying to willic3@…:

I have managed to build py26-mayavi using the patched portfile above, along with the portfiles and patches for wxWidgets-python and py26-wxpython (http://trac.macports.org/ticket/24350). I also built VTK5 with X11, and I end up with a pure X11 version of mayavi2 that seems to work OK.

I'm running OS X 10.6.3 (64-bit mode) on a MacBook Pro.

Please let me know if you need any more info.

Did you have to install vtk5 +python26? During my install of py26-mayavi, I was running into the error, " ImportError: No module named vtk". Does py26-mayavi depend on this variant?

comment:11 in reply to:  10 Changed 14 years ago by jjstickel@…

Replying to jeffery.kline@…:

Did you have to install vtk5 +python26? During my install of py26-mayavi, I was running into the error, " ImportError: No module named vtk". Does py26-mayavi depend on this variant?

Yes, vtk5 needs to be installed with the +python26 variant. Variant dependencies are not (yet?) supported in Macports, unfortunately. You also will need the +x11 variant to use the +gtk variant of wxwidgets and wxpython.

comment:12 in reply to:  3 Changed 14 years ago by orbeckst (Oliver Beckstein)

Replying to jjstickel@…:

I found a solution by compiling vtk5 against x11 and wxwidgets/wxpython against gtk+x11.

I was successful in compiling py26-mayavi on Snow Leopard 10.6.4 following jjstickel's recipe. In summary I did:

  sudo port install py26-wxpython +gtk  wxWidgets-python +gtk
  sudo port install vtk5 +python26 +x11

(note that the wx-* packages already contain the patches mentioned in #24350 so no additional patching required.)

Then I patched the existing py-mayavi2 package with the py26-mayavi_Portfile.diff patch (downloaded to the /tmp directory) and build/install:

  cd `port dir py26-mayavi`
  sudo patch -p2 < /tmp/py26-mayavi_Portfile.diff
  sudo port install py26-mayavi

This results in a working X11/gtk version of mayavi2 (works as standalone or import into a running ipython -wthread).

comment:13 Changed 14 years ago by orbeckst (Oliver Beckstein)

Cc: orbeckst@… added

Cc Me!

comment:14 Changed 14 years ago by mf2k (Frank Schima)

@ jjstickel: Have you had any luck installing the Qt4 traitsbackend? Why did you choose the wx backend instead?

comment:15 in reply to:  14 Changed 14 years ago by jjstickel@…

Replying to macsforever2000@…:

@ jjstickel: Have you had any luck installing the Qt4 traitsbackend? Why did you choose the wx backend instead?

From what I can tell, Mayavi2 was first developed with the wx backend. A Qt interface was added more recently. I did try the Qt interface some time ago, and it did not work. However, there are more recent versions of the enthought modules available now (including Mayavi itself) that might have important Qt improvements. I just haven't had time to implement all the upgrades to the ports and test them with the Qt backend. Someone else is welcome to try. I am very busy at work these days.

comment:16 Changed 14 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

I have updated py26-mayavi to the latest version and it no longer requires vtk5 +carbon in r70687. If there are problems, we can open a new ticket.

comment:17 Changed 14 years ago by mf2k (Frank Schima)

BTW, I added a py26-traitsbackendqt but i have not had success running it with mayavi yet. To use it, install py26-traitsgui + qt4.

comment:18 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… added

Cc Me!

comment:19 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… removed

Cc Me!

Note: See TracTickets for help on using tickets.