summaryrefslogtreecommitdiff
path: root/dev-python/gnuplot-py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/gnuplot-py
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/gnuplot-py')
-rw-r--r--dev-python/gnuplot-py/Manifest4
-rw-r--r--dev-python/gnuplot-py/files/gnuplot-py-1.7-mousesupport.patch75
-rw-r--r--dev-python/gnuplot-py/gnuplot-py-1.8-r1.ebuild32
-rw-r--r--dev-python/gnuplot-py/metadata.xml21
4 files changed, 132 insertions, 0 deletions
diff --git a/dev-python/gnuplot-py/Manifest b/dev-python/gnuplot-py/Manifest
new file mode 100644
index 000000000000..b2a9d496147d
--- /dev/null
+++ b/dev-python/gnuplot-py/Manifest
@@ -0,0 +1,4 @@
+AUX gnuplot-py-1.7-mousesupport.patch 2596 BLAKE2B f3fa9063718d6d3ce9ad847c8517f6728f7f32064cc5c13165a993aca556257e600371542f5b2bb34b868cd5a07196ffd7587b852c266229fada49b1288358f7 SHA512 5dee0dcb4b24aef830a9c65678dcb4ca1a831a7dff04723e2248219883e578cdc136b668f05ab95d13c7bbd7da47b20012e0b3d1149342bb64336325c2f1dbbd
+DIST gnuplot-py-1.8.tar.gz 118828 BLAKE2B 880062169b2fa047d60318cc7dc556c60794bfd81317681395329a56712506f7e406efecb79f37cd98103e76a6feb8b635e55fe056c3ce5bee0c670c8bcaf7a8 SHA512 748dc95ea53acd362f67c821a3cc7cf23b6329c2dd13c130c91e1c9f89afe1ffd84619ed321923c65455adf86ee58976dd6dd187881ee3ede5e0f5f551fb027d
+EBUILD gnuplot-py-1.8-r1.ebuild 855 BLAKE2B 7f3a1d3543c386a3beabb84efe7162d0667d66410f6307422dff2e84f3e6e5b85f2dfbdf2391f9db372995bb2ced17f085af2cd54886fbb5708538d5fc5daae2 SHA512 ecaf45fed606f1f0653cdee122d930edee1a1fd208dd541dce609c07e1218eaedc2c9afc798b16c702975c016f0c3a860f6e53ca7604ea94a7f995d19ff949f1
+MISC metadata.xml 903 BLAKE2B d642116ef411d7556dffe4486d5360d7dce68927ccead0e3c00261cd89be47fab812ef9fc9455489dd79251f0a16f3c2ce5c1e9b826871f35a2e09b47da61988 SHA512 a007d4c76b4c868757567a8c37d95a825a95b2d21c4a19d050834c3e36753014f2ef8d69e3b99c7eaa52d8e8a5e6ecaca5a9bc4e23079367b055af62447aca69
diff --git a/dev-python/gnuplot-py/files/gnuplot-py-1.7-mousesupport.patch b/dev-python/gnuplot-py/files/gnuplot-py-1.7-mousesupport.patch
new file mode 100644
index 000000000000..2eaf6ae379ed
--- /dev/null
+++ b/dev-python/gnuplot-py/files/gnuplot-py-1.7-mousesupport.patch
@@ -0,0 +1,75 @@
+--- _Gnuplot.py.orig 2003-10-17 16:28:10.000000000 +0200
++++ _Gnuplot.py 2004-10-28 14:39:20.000000000 +0200
+@@ -18,6 +18,27 @@
+
+ import gp, PlotItems, termdefs
+
++def test_mouse():
++ """Return whether mouse support is present or not.
++
++ The detection is done by calling gnuplot with a file containing only the
++ "set mouse" command. If gnuplot does have mouse support, it should simply
++ execute the file silently, producing no output."""
++
++ import os,tempfile,commands
++
++ tmpname = tempfile.mktemp()
++ tfile = open(tmpname,"w")
++ tfile.write("set mouse")
++ tfile.close()
++ msg = commands.getoutput(gp.GnuplotOpts.gnuplot_command + " " +
++ tmpname)
++ os.unlink(tmpname)
++ if msg: # Gnuplot won"t print anything if it has mouse support
++ has_mouse = 0
++ else:
++ has_mouse = 1
++ return has_mouse
+
+ class _GnuplotFile:
+ """A file to which gnuplot commands can be written.
+@@ -152,7 +173,7 @@
+ 'output' : 'string',
+ }
+
+- def __init__(self, filename=None, persist=None, debug=0):
++ def __init__(self, filename=None, persist=None, debug=0, mouse=None):
+ """Create a Gnuplot object.
+
+ Create a 'Gnuplot' object. By default, this starts a gnuplot
+@@ -172,8 +193,19 @@
+ 'debug=1' -- echo the gnuplot commands to stderr as well as
+ sending them to gnuplot.
+
++ "mouse=1" -- activate mouse support (officially available as of
++ gnuplot 4.0 under certain platforms).
++
+ """
+
++ # The mouse check must be done first, so we can decide whether to use
++ # inline data and fifos or not (they break mouse support)
++ if mouse is None:
++ mouse = test_mouse()
++ if mouse:
++ gp.GnuplotOpts.prefer_inline_data = 0
++ gp.GnuplotOpts.prefer_fifo_data = 0
++
+ if filename is None:
+ self.gnuplot = gp.GnuplotProcess(persist=persist)
+ else:
+@@ -182,10 +214,14 @@
+ 'Gnuplot with output to file does not allow '
+ 'persist option.')
+ self.gnuplot = _GnuplotFile(filename)
++
+ self._clear_queue()
+ self.debug = debug
+ self.plotcmd = 'plot'
+- self('set terminal %s' % (gp.GnuplotOpts.default_term,))
++ # The "set mouse" command MUST be the VERY FIRST command passed to gnuplot
++ if mouse:
++ self("set mouse")
++ self("set terminal %s" % gp.GnuplotOpts.default_term)
+
+ def __call__(self, s):
+ """Send a command string to gnuplot.
diff --git a/dev-python/gnuplot-py/gnuplot-py-1.8-r1.ebuild b/dev-python/gnuplot-py/gnuplot-py-1.8-r1.ebuild
new file mode 100644
index 000000000000..de2582903119
--- /dev/null
+++ b/dev-python/gnuplot-py/gnuplot-py-1.8-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+PYTHON_SINGLE_IMPL=true
+
+inherit distutils-r1
+
+DESCRIPTION="A python wrapper for Gnuplot"
+HOMEPAGE="http://gnuplot-py.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc ppc64 ~s390 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc"
+
+DEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ sci-visualization/gnuplot"
+
+DOCS=( ANNOUNCE.txt CREDITS.txt FAQ.txt NEWS.txt TODO.txt )
+
+PATCHES=( "${FILESDIR}"/${PN}-1.7-mousesupport.patch )
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/Gnuplot/. )
+ distutils-r1_python_install_all
+}
+# testsuite does NOT run unattended, so left out here
diff --git a/dev-python/gnuplot-py/metadata.xml b/dev-python/gnuplot-py/metadata.xml
new file mode 100644
index 000000000000..fe1997fa7b08
--- /dev/null
+++ b/dev-python/gnuplot-py/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ Gnuplot.py is a Python module that interfaces to gnuplot, the popular
+ plotting program. It allows you to use gnuplot from within Python to
+ plot arrays of data from memory, data files, or mathematical
+ functions. If you use Python to perform computations or as `glue' for
+ numerical programs, you can use this module to plot data on the fly as
+ they are computed. And the combination with Python makes it is easy to
+ automate things, including to create crude `animations' by plotting
+ different datasets one after another.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gnuplot-py</remote-id>
+ </upstream>
+</pkgmetadata>