summaryrefslogtreecommitdiff
path: root/dev-python/gnuplot-py
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/gnuplot-py')
-rw-r--r--dev-python/gnuplot-py/Manifest6
-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, 134 insertions, 0 deletions
diff --git a/dev-python/gnuplot-py/Manifest b/dev-python/gnuplot-py/Manifest
new file mode 100644
index 000000000000..3f6db7ed9da9
--- /dev/null
+++ b/dev-python/gnuplot-py/Manifest
@@ -0,0 +1,6 @@
+AUX gnuplot-py-1.7-mousesupport.patch 2596 SHA256 5e0f161cc3fb1b5e3251a79e203ff1ec190452f3fd8bed2b753f1ec948229cef SHA512 5dee0dcb4b24aef830a9c65678dcb4ca1a831a7dff04723e2248219883e578cdc136b668f05ab95d13c7bbd7da47b20012e0b3d1149342bb64336325c2f1dbbd WHIRLPOOL 6f3254d39c9196ca7488ef3785783b3129de11865e7e8388a90e4f4bf9f6879c26ee2fcba30071b3b3031a95ae4fa4c4dd586256636ea95dc20ecae2407b4454
+DIST gnuplot-py-1.8.tar.gz 118828 SHA256 ab339be7847d30a8acfd616f27b5021bfde0999b7bf2d68400fbe62c53106e21 SHA512 748dc95ea53acd362f67c821a3cc7cf23b6329c2dd13c130c91e1c9f89afe1ffd84619ed321923c65455adf86ee58976dd6dd187881ee3ede5e0f5f551fb027d WHIRLPOOL b13436a3de17db7c871f7179291e0b9669dc7b3b6de9b4e0463e9989c1c0105c2495145ffd12e163cbbc75ff863ce657dbd64aca305c5a42c529e0f2411e7060
+EBUILD gnuplot-py-1.8-r1.ebuild 854 SHA256 7b640b29fa33ccb084feda5b89901f66f8510a40d0cc89da52fe5b524cae6495 SHA512 d840d450515ec30fc55ea0d1921e25f6b829f88d191222fceae25c736458ba10a5e59b3ad78e8b50000876af49312297e2f02e07f43455086578b1be12ff74de WHIRLPOOL 3d4d80af376f8b5da95513e5e31d04976051f608b2036934b5c8286f7f67cfdce4bdaf5d761eda5d84b7d83262e6c677d5e810ef826da404f597fdaeb6aa7816
+MISC ChangeLog 2484 SHA256 e313d58574787a7557c917155c6f6e384b8e9417734b48e50903fea06afe3e12 SHA512 3e65c10605331868d58c3ee822b37272c098958eff7e306c494c4f96903edcab4b9f4bb6238e30acfc5c9f455f7c87311fe4c3ac2d306d8a8cc53717cf3ed042 WHIRLPOOL 63d2cf8102a39382dc0b859fa48ce30ca5a4041a574055b3b7db9031bc572e77d5777b7784c2ff0a5974744eaa7ffde4802353e5fd6000ce3182f37d69ee8465
+MISC ChangeLog-2015 6615 SHA256 2e814fa8c24bc877bdd823e2cc872759fca82cdf7734e914c6a2a0f2386c0341 SHA512 f962eac46abe278c840a3a6fddb4a90dca8235e81c18f42275803fe46be05069a9cf29f7e443017cf99f21017a12740a42111e261f48db5bdf72d4b248908241 WHIRLPOOL 617fa8db2a9b086cc4826f6196efb08546e9b07b20c86045afb30b482e0206ea704c1968ef77a550c7cfdf641692b5c74781c27748773863e4afd57550c3b8b0
+MISC metadata.xml 902 SHA256 e76f0c4e846d28afcc67b091d4915ad1d91479b9e8b67a97301ba06c9aebb5a6 SHA512 1bff541b1e9ed569db2c6ac78eca5842c4a6e456d9a3e72649d4a8f2584f039adf33db7cbf6d9224ec00b69f7ebdf7e72b8bbc13f44fbb5565586bbb7cfcf9e8 WHIRLPOOL 2356fee56f4ec3752cb4711ef014d689fca9eae3e85331ea555415458fc9b3b9117e9cdd12daeeafc81216f8fe5992f3885e3413b78bb10b6547930d62134f11
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..dd6977fde737
--- /dev/null
+++ b/dev-python/gnuplot-py/gnuplot-py-1.8-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 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..b7268ab2fa8a
--- /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>