Opened 19 years ago

Closed 17 years ago

Last modified 9 years ago

#4805 closed enhancement (fixed)

RFE: py-matplotlib could have variant tk

Reported by: than@… Owned by: michaelm@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: markd@…, idgregorio@…
Port: py-matplotlib

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I like to use the interative version of py-matplotlib (where you don't always have to type show() after each plot command). This only works with the tkAgg backend, which is disabled for some reason in the current Portfile.

I would actually argue that tkAgg should be enabled by default, but I leave that to wiser heads than mine. I used the following patch to the py-matplotlib Portfile to enable the tkAgg backend as a variant:

--- Portfile    Mon Jul  4 05:48:43 2005
+++ Portfile.tk Fri Sep  2 10:12:39 2005
@@ -37,8 +37,13 @@
                 reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \
                   ${worksrcpath}/setup.py
         }
-        reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \
+       if {![variant_isset tk]} {
+               reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \
                 ${worksrcpath}/setup.py
+       } else {
+               reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \
+                ${worksrcpath}/setup.py
+       }
 }
 
 post-patch { reinplace "s|@@DPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py }
@@ -61,3 +66,6 @@
         depends_lib-append      port:py-gtk2
 }
 
+variant tk {
+       depends_lib-append      port:py-tkinter
+}

Change History (9)

comment:1 Changed 19 years ago by mww@…

Owner: changed from darwinports-bugs@… to michaelm@…

comment:2 Changed 19 years ago by mww@…

Summary: py-matplotlib could have variant tkRFE: py-matplotlib could have variant tk

comment:3 Changed 18 years ago by markd@…

Cc: markd@… added

Sorry this has been out there so long. Any chance you'd like to takeover as maintainer of the port? I doubt the current maintainer would object. I just updated it to 0.87.4.

comment:4 Changed 18 years ago by markd@…

Type: defectenhancement

comment:5 Changed 18 years ago by pipping@…

Milestone: Available Ports

comment:6 Changed 18 years ago by pipping@…

Milestone: Available PortsPort Enhancements

comment:7 Changed 17 years ago by nox@…

Cc: markd@… idgregorio@… added; markd@… removed
Priority: ExpectedNormal
Resolution: fixed
Status: newclosed
Version: 1.0

Tk is provided by tkinter variant, isn't it?

comment:8 Changed 16 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:9 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: py-matplotlib added
Note: See TracTickets for help on using tickets.