[MacPorts] #4805: RFE: py-matplotlib could have variant tk

MacPorts noreply at macports.org
Thu Mar 24 08:18:31 PDT 2016


#4805: RFE: py-matplotlib could have variant tk
----------------------------+------------------------
  Reporter:  than@…         |      Owner:  michaelm@…
      Type:  enhancement    |     Status:  closed
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:
Resolution:  fixed          |   Keywords:
      Port:  py-matplotlib  |
----------------------------+------------------------
Changes (by ryandesign@…):

 * port:   => py-matplotlib


Old description:

> 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
> +}

New description:

 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
 +}
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/4805#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list