forked from pool/python-matplotlib
Accepting request 492245 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/492245 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-matplotlib?expand=0&rev=52
This commit is contained in:
parent
0c24c5637a
commit
f69b712df4
@ -70,14 +70,24 @@ dateutil = False
|
|||||||
#
|
#
|
||||||
agg = True
|
agg = True
|
||||||
cairo = True
|
cairo = True
|
||||||
gtk = True
|
gdk = False
|
||||||
gtk3agg = Auto
|
gtk = False
|
||||||
gtk3cairo = Auto
|
gtkagg = False
|
||||||
gtkagg = True
|
gtkcairo = False
|
||||||
pyside = Auto
|
gtk3 = True
|
||||||
qt4agg = Auto
|
gtk3agg = True
|
||||||
|
gtk3cairo = True
|
||||||
|
nbagg = True
|
||||||
|
pdf = True
|
||||||
|
pgf = True
|
||||||
|
ps = True
|
||||||
|
qt4 = True
|
||||||
|
qt4agg = True
|
||||||
|
qt5 = True
|
||||||
|
qt5agg = True
|
||||||
|
svg = True
|
||||||
tkagg = True
|
tkagg = True
|
||||||
wxagg = Auto
|
webagg = True
|
||||||
macosx = False
|
macosx = False
|
||||||
windowing = False
|
windowing = False
|
||||||
|
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright © 2009 Pierre Raybaut
|
|
||||||
# Licensed under the terms of the MIT License
|
|
||||||
|
|
||||||
from PyQt4.QtGui import QIcon
|
|
||||||
from PyQt4.QtDesigner import QPyDesignerCustomWidgetPlugin
|
|
||||||
|
|
||||||
import os
|
|
||||||
from matplotlib import rcParams
|
|
||||||
from matplotlibwidget import MatplotlibWidget
|
|
||||||
|
|
||||||
rcParams['font.size'] = 9
|
|
||||||
|
|
||||||
class MatplotlibPlugin(QPyDesignerCustomWidgetPlugin):
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
QPyDesignerCustomWidgetPlugin.__init__(self)
|
|
||||||
|
|
||||||
self._initialized = False
|
|
||||||
|
|
||||||
def initialize(self, formEditor):
|
|
||||||
if self._initialized:
|
|
||||||
return
|
|
||||||
|
|
||||||
self._initialized = True
|
|
||||||
|
|
||||||
def isInitialized(self):
|
|
||||||
return self._initialized
|
|
||||||
|
|
||||||
def createWidget(self, parent):
|
|
||||||
return MatplotlibWidget(parent)
|
|
||||||
|
|
||||||
def name(self):
|
|
||||||
return "MatplotlibWidget"
|
|
||||||
|
|
||||||
def group(self):
|
|
||||||
return "Python(x,y)"
|
|
||||||
|
|
||||||
def icon(self):
|
|
||||||
image = os.path.join(rcParams['datapath'], 'images', 'matplotlib.png')
|
|
||||||
return QIcon(image)
|
|
||||||
|
|
||||||
def toolTip(self):
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def whatsThis(self):
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def isContainer(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def domXml(self):
|
|
||||||
return '<widget class="MatplotlibWidget" name="mplwidget">\n' \
|
|
||||||
'</widget>\n'
|
|
||||||
|
|
||||||
def includeFile(self):
|
|
||||||
return "matplotlibwidget"
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
import sys
|
|
||||||
from PyQt4.QtGui import QApplication
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
widget = MatplotlibWidget()
|
|
||||||
widget.show()
|
|
||||||
sys.exit(app.exec_())
|
|
@ -1,124 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright © 2009 Pierre Raybaut
|
|
||||||
# Licensed under the terms of the MIT License
|
|
||||||
|
|
||||||
"""
|
|
||||||
MatplotlibWidget
|
|
||||||
================
|
|
||||||
|
|
||||||
Example of matplotlib widget for PyQt4
|
|
||||||
|
|
||||||
Copyright © 2009 Pierre Raybaut
|
|
||||||
This software is licensed under the terms of the MIT License
|
|
||||||
|
|
||||||
Derived from 'embedding_in_pyqt4.py':
|
|
||||||
Copyright © 2005 Florent Rougon, 2006 Darren Dale
|
|
||||||
"""
|
|
||||||
|
|
||||||
__version__ = "1.0.0"
|
|
||||||
|
|
||||||
from PyQt4.QtGui import QSizePolicy
|
|
||||||
from PyQt4.QtCore import QSize
|
|
||||||
|
|
||||||
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as Canvas
|
|
||||||
from matplotlib.figure import Figure
|
|
||||||
|
|
||||||
from matplotlib import rcParams
|
|
||||||
rcParams['font.size'] = 9
|
|
||||||
|
|
||||||
|
|
||||||
class MatplotlibWidget(Canvas):
|
|
||||||
"""
|
|
||||||
MatplotlibWidget inherits PyQt4.QtGui.QWidget
|
|
||||||
and matplotlib.backend_bases.FigureCanvasBase
|
|
||||||
|
|
||||||
Options: option_name (default_value)
|
|
||||||
-------
|
|
||||||
parent (None): parent widget
|
|
||||||
title (''): figure title
|
|
||||||
xlabel (''): X-axis label
|
|
||||||
ylabel (''): Y-axis label
|
|
||||||
xlim (None): X-axis limits ([min, max])
|
|
||||||
ylim (None): Y-axis limits ([min, max])
|
|
||||||
xscale ('linear'): X-axis scale
|
|
||||||
yscale ('linear'): Y-axis scale
|
|
||||||
width (4): width in inches
|
|
||||||
height (3): height in inches
|
|
||||||
dpi (100): resolution in dpi
|
|
||||||
hold (False): if False, figure will be cleared each time plot is called
|
|
||||||
|
|
||||||
Widget attributes:
|
|
||||||
-----------------
|
|
||||||
figure: instance of matplotlib.figure.Figure
|
|
||||||
axes: figure axes
|
|
||||||
|
|
||||||
Example:
|
|
||||||
-------
|
|
||||||
self.widget = MatplotlibWidget(self, yscale='log', hold=True)
|
|
||||||
from numpy import linspace
|
|
||||||
x = linspace(-10, 10)
|
|
||||||
self.widget.axes.plot(x, x**2)
|
|
||||||
self.wdiget.axes.plot(x, x**3)
|
|
||||||
"""
|
|
||||||
def __init__(self, parent=None, title='', xlabel='', ylabel='',
|
|
||||||
xlim=None, ylim=None, xscale='linear', yscale='linear',
|
|
||||||
width=4, height=3, dpi=100, hold=False):
|
|
||||||
self.figure = Figure(figsize=(width, height), dpi=dpi)
|
|
||||||
self.axes = self.figure.add_subplot(111)
|
|
||||||
self.axes.set_title(title)
|
|
||||||
self.axes.set_xlabel(xlabel)
|
|
||||||
self.axes.set_ylabel(ylabel)
|
|
||||||
if xscale is not None:
|
|
||||||
self.axes.set_xscale(xscale)
|
|
||||||
if yscale is not None:
|
|
||||||
self.axes.set_yscale(yscale)
|
|
||||||
if xlim is not None:
|
|
||||||
self.axes.set_xlim(*xlim)
|
|
||||||
if ylim is not None:
|
|
||||||
self.axes.set_ylim(*ylim)
|
|
||||||
self.axes.hold(hold)
|
|
||||||
|
|
||||||
Canvas.__init__(self, self.figure)
|
|
||||||
self.setParent(parent)
|
|
||||||
|
|
||||||
Canvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding)
|
|
||||||
Canvas.updateGeometry(self)
|
|
||||||
|
|
||||||
def sizeHint(self):
|
|
||||||
w, h = self.get_width_height()
|
|
||||||
return QSize(w, h)
|
|
||||||
|
|
||||||
def minimumSizeHint(self):
|
|
||||||
return QSize(10, 10)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
|
||||||
# Example
|
|
||||||
#===============================================================================
|
|
||||||
if __name__ == '__main__':
|
|
||||||
import sys
|
|
||||||
from PyQt4.QtGui import QMainWindow, QApplication
|
|
||||||
from numpy import linspace
|
|
||||||
|
|
||||||
class ApplicationWindow(QMainWindow):
|
|
||||||
def __init__(self):
|
|
||||||
QMainWindow.__init__(self)
|
|
||||||
self.mplwidget = MatplotlibWidget(self, title='Example',
|
|
||||||
xlabel='Linear scale',
|
|
||||||
ylabel='Log scale',
|
|
||||||
hold=True, yscale='log')
|
|
||||||
self.mplwidget.setFocus()
|
|
||||||
self.setCentralWidget(self.mplwidget)
|
|
||||||
self.plot(self.mplwidget.axes)
|
|
||||||
|
|
||||||
def plot(self, axes):
|
|
||||||
x = linspace(-10, 10)
|
|
||||||
axes.plot(x, x**2)
|
|
||||||
axes.plot(x, x**3)
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
win = ApplicationWindow()
|
|
||||||
win.show()
|
|
||||||
sys.exit(app.exec_())
|
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 30 17:33:15 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Restore qt4 backend since qt4 still has maintained,
|
||||||
|
python3-comptible python bindings.
|
||||||
|
- Provide/obsolete gtk backend to avoid conflicts.
|
||||||
|
It doesn't have maintained, python3-compatible python bindings.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 27 16:06:41 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version
|
||||||
|
- Drop old qt4 and gtk2 backends
|
||||||
|
- Drop unmaintained qt designer widget
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 10 17:46:10 UTC 2017 - toddrme2178@gmail.com
|
Fri Mar 10 17:46:10 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
@ -16,6 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#Not doing tests because they take too long
|
||||||
|
%bcond_with tests
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%define oldpython python
|
||||||
Name: python-matplotlib
|
Name: python-matplotlib
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -25,104 +30,91 @@ Group: Development/Libraries/Python
|
|||||||
Url: http://matplotlib.org
|
Url: http://matplotlib.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-%{version}.tar.gz
|
||||||
Source1: matplotlib-setup.cfg
|
Source1: matplotlib-setup.cfg
|
||||||
Source2: matplotlibplugin.py
|
|
||||||
Source3: matplotlibwidget.py
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: c++_compiler
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: fltk-devel
|
BuildRequires: fltk-devel
|
||||||
BuildRequires: freetype2-devel >= 2.3
|
|
||||||
BuildRequires: gcc-c++
|
|
||||||
BuildRequires: ghostscript
|
BuildRequires: ghostscript
|
||||||
BuildRequires: libpng-devel >= 1.2
|
BuildRequires: libxml2-tools
|
||||||
BuildRequires: libxml2
|
|
||||||
BuildRequires: pkg-config
|
|
||||||
BuildRequires: poppler-tools
|
BuildRequires: poppler-tools
|
||||||
BuildRequires: python-CXX-devel >= 6.2.4
|
|
||||||
BuildRequires: python-Cycler
|
|
||||||
BuildRequires: python-devel
|
|
||||||
BuildRequires: python-imaging
|
|
||||||
BuildRequires: python-numpy-devel >= 1.6
|
|
||||||
BuildRequires: python-pyparsing >= 1.5.6
|
|
||||||
BuildRequires: python-python-dateutil >= 1.1
|
|
||||||
BuildRequires: python-pytz
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: python-six >= 1.3
|
|
||||||
BuildRequires: qhull-devel >= 2003.1
|
BuildRequires: qhull-devel >= 2003.1
|
||||||
# needed for testing -- Not doing tests because they take too long
|
BuildRequires: pkg-config
|
||||||
# BuildRequires: inkscape
|
BuildRequires: pkgconfig(freetype2) >= 2.3
|
||||||
# BuildRequires: python-mock
|
BuildRequires: pkgconfig(libpng) >= 1.2
|
||||||
# BuildRequires: python-nose
|
# Python 2 only
|
||||||
# cairo dependencies
|
BuildRequires: python-functools32
|
||||||
BuildRequires: python-cairocffi
|
BuildRequires: python-subprocess32
|
||||||
# GTK dependencies
|
# Needed for all versions of python
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: libgnome-devel
|
BuildRequires: %{python_module Cycler}
|
||||||
%if 0%{?suse_version} != 1110
|
BuildRequires: %{python_module Pillow}
|
||||||
BuildRequires: python-gobject
|
BuildRequires: %{python_module numpy >= 1.6}
|
||||||
BuildRequires: python-gobject-devel
|
BuildRequires: %{python_module numpy-devel >= 1.6}
|
||||||
|
BuildRequires: %{python_module pyparsing >= 1.5.6}
|
||||||
|
BuildRequires: %{python_module python-dateutil >= 1.1}
|
||||||
|
BuildRequires: %{python_module pytz}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module six >= 1.3}
|
||||||
|
# needed for testing
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: inkscape
|
||||||
|
BuildRequires: %{python_module mock}
|
||||||
|
BuildRequires: %{python_module nose}
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: python-gobject2
|
# cairo dependencies
|
||||||
BuildRequires: python-gobject2-devel
|
BuildRequires: %{python_module cairocffi}
|
||||||
BuildRequires: python-gtk >= 2.2.0
|
# GTK3 dependencies
|
||||||
BuildRequires: python-gtk-devel >= 2.2.0
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
%if 0%{?suse_version} != 1110
|
BuildRequires: %{python_module gobject}
|
||||||
|
BuildRequires: %{python_module gobject-devel}
|
||||||
# latex dependencies
|
# latex dependencies
|
||||||
BuildRequires: texlive-dvipng
|
BuildRequires: texlive-dvipng
|
||||||
BuildRequires: texlive-latex
|
BuildRequires: texlive-latex
|
||||||
BuildRequires: texlive-tex
|
BuildRequires: texlive-tex
|
||||||
%if 0%{?suse_version} != 1315
|
|
||||||
BuildRequires: texlive-sfmath
|
BuildRequires: texlive-sfmath
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
# Qt4 dependencies
|
# Qt4 dependencies
|
||||||
%if 0%{?suse_version} != 1110
|
BuildRequires: %{python_module qt4}
|
||||||
BuildRequires: python-pyside
|
BuildRequires: %{python_module qt4-devel}
|
||||||
%endif
|
|
||||||
BuildRequires: python-qt4
|
|
||||||
BuildRequires: python-qt4-devel
|
|
||||||
%ifarch %{ix86} x86_64
|
|
||||||
%if 0%{?suse_version} >= 1315 && 0%{?is_opensuse} != 0
|
|
||||||
# Qt5 dependencies
|
# Qt5 dependencies
|
||||||
BuildRequires: python-qt5
|
BuildRequires: %{python_module qt5}
|
||||||
BuildRequires: python-qt5-devel
|
BuildRequires: %{python_module qt5-devel}
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
# tk dependencies
|
# tk dependencies
|
||||||
BuildRequires: python-tk
|
BuildRequires: %{python_module tk}
|
||||||
BuildRequires: tcl
|
BuildRequires: tcl
|
||||||
BuildRequires: tcl-devel
|
|
||||||
BuildRequires: tk
|
BuildRequires: tk
|
||||||
BuildRequires: tk-devel
|
BuildRequires: pkgconfig(tcl)
|
||||||
|
BuildRequires: pkgconfig(tk)
|
||||||
# WebAgg dependencies
|
# WebAgg dependencies
|
||||||
BuildRequires: python-tornado
|
BuildRequires: %{python_module tornado}
|
||||||
%if 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315 || 0%{?suse_version} >= 1315 && 0%{?is_opensuse} != 0
|
# Wx dependencies (currently Python 2 only)
|
||||||
%if 0%{?suse_version} >= 1320
|
|
||||||
BuildRequires: python-wxWidgets
|
BuildRequires: python-wxWidgets
|
||||||
BuildRequires: wxWidgets-devel >= 3
|
BuildRequires: wxWidgets-devel >= 3
|
||||||
%else
|
|
||||||
# Wx dependencies
|
|
||||||
BuildRequires: python-wxWidgets >= 2.8
|
|
||||||
BuildRequires: wxWidgets-devel
|
|
||||||
%define _use_internal_dependency_generator 0
|
|
||||||
%define __find_requires %wx_requires
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
Requires: python-Cycler
|
Requires: python-Cycler
|
||||||
Requires: python-functools32
|
|
||||||
Requires: python-numpy >= 1.6
|
Requires: python-numpy >= 1.6
|
||||||
Requires: python-pyparsing >= 1.5.6
|
Requires: python-pyparsing >= 1.5.6
|
||||||
Requires: python-python-dateutil >= 1.1
|
Requires: python-python-dateutil >= 1.1
|
||||||
Requires: python-pytz
|
Requires: python-pytz
|
||||||
Requires: python-six >= 1.3
|
Requires: python-six >= 1.3
|
||||||
|
%ifpython2
|
||||||
|
Requires: python-functools32
|
||||||
|
Requires: python-subprocess32
|
||||||
|
%endif
|
||||||
Recommends: ghostscript
|
Recommends: ghostscript
|
||||||
Recommends: libxml2-tools
|
Recommends: libxml2-tools
|
||||||
Recommends: python-imaging
|
Recommends: python-Pillow
|
||||||
Recommends: poppler-tools
|
Recommends: poppler-tools
|
||||||
Recommends: python-matplotlib-tk
|
Recommends: python-matplotlib-tk
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
# Change <= to < in next release after 2.0.0
|
||||||
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
Provides: python-matplotlib-gtk = %{version}
|
||||||
|
Obsoletes: python-matplotlib-gtk <= %{version}
|
||||||
|
%ifpython2
|
||||||
|
Provides: %{oldpython}-matplotlib-gtk = %{version}
|
||||||
|
Obsoletes: %{oldpython}-matplotlib-gtk <= %{version}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
matplotlib is a python 2D plotting library which produces publication
|
matplotlib is a python 2D plotting library which produces publication
|
||||||
quality figures in a variety of hardcopy formats and interactive
|
quality figures in a variety of hardcopy formats and interactive
|
||||||
@ -141,19 +133,6 @@ Requires: python-cairocffi
|
|||||||
This package includes the non-interactive Cairo-based backend
|
This package includes the non-interactive Cairo-based backend
|
||||||
for the %{name} plotting package
|
for the %{name} plotting package
|
||||||
|
|
||||||
%package gtk2
|
|
||||||
Summary: GTK2 backends for %{name}
|
|
||||||
License: BSD-2-Clause
|
|
||||||
Group: Development/Libraries/Python
|
|
||||||
Requires: %{name} = %{version}
|
|
||||||
Requires: %{name}-cairo = %{version}
|
|
||||||
Requires: python-gobject2
|
|
||||||
Requires: python-gtk >= 2.2.0
|
|
||||||
|
|
||||||
%description gtk2
|
|
||||||
This package includes the GTK2-based gdk, gtk, gtkagg, and
|
|
||||||
gtkcairo backends for the %{name} plotting package
|
|
||||||
|
|
||||||
%package gtk3
|
%package gtk3
|
||||||
Summary: GTK3 backends for %{name}
|
Summary: GTK3 backends for %{name}
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
@ -197,7 +176,6 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: %{name}-qt-shared = %{version}
|
Requires: %{name}-qt-shared = %{version}
|
||||||
Requires: python-pyside
|
|
||||||
Requires: python-qt4 >= 4.0
|
Requires: python-qt4 >= 4.0
|
||||||
|
|
||||||
%description qt4
|
%description qt4
|
||||||
@ -216,19 +194,6 @@ Requires: python-qt5
|
|||||||
This package includes the Qt5-based pyqt5 backend
|
This package includes the Qt5-based pyqt5 backend
|
||||||
for the %{name} plotting package
|
for the %{name} plotting package
|
||||||
|
|
||||||
%package designer
|
|
||||||
Summary: Qt Designer plugin for %{name}
|
|
||||||
License: MIT
|
|
||||||
Group: Development/Libraries/Python
|
|
||||||
Requires: %{name}-qt4 = %{version}
|
|
||||||
Requires: qt-creator
|
|
||||||
|
|
||||||
%description designer
|
|
||||||
This is a plugin and widget to let you use %{name}
|
|
||||||
plots as widget in PyQt4 GUIs using Qt Designer
|
|
||||||
|
|
||||||
This plugin comes from Python(x,y)
|
|
||||||
|
|
||||||
%package tk
|
%package tk
|
||||||
Summary: Tk backend for %{name}
|
Summary: Tk backend for %{name}
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
@ -252,14 +217,14 @@ Requires: python-tornado
|
|||||||
This package includes the browser-based webagg backend
|
This package includes the browser-based webagg backend
|
||||||
for the %{name} plotting package
|
for the %{name} plotting package
|
||||||
|
|
||||||
%package wx
|
%package -n %{python2_prefix}-matplotlib-wx
|
||||||
Summary: WxWidgets backend for %{name}
|
Summary: WxWidgets backend for %{name}
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: python-wxWidgets >= 2.8
|
Requires: python-wxWidgets >= 2.8
|
||||||
|
|
||||||
%description wx
|
%description -n %{python2_prefix}-matplotlib-wx
|
||||||
This package includes the wxWidgets-based wxagg backend
|
This package includes the wxWidgets-based wxagg backend
|
||||||
for %{name} plotting package
|
for %{name} plotting package
|
||||||
|
|
||||||
@ -271,25 +236,20 @@ find examples lib/matplotlib lib/mpl_toolkits/mplot3d -type f -name "*.py" -exec
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
cp %{SOURCE1} ./setup.cfg
|
cp %{SOURCE1} ./setup.cfg
|
||||||
%if 0%{?suse_version} > 1310
|
|
||||||
export XDG_RUNTIME_DIR=/tmp
|
export XDG_RUNTIME_DIR=/tmp
|
||||||
%endif
|
%python_build
|
||||||
python setup.py build
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?suse_version} > 1310
|
|
||||||
export XDG_RUNTIME_DIR=/tmp
|
export XDG_RUNTIME_DIR=/tmp
|
||||||
|
%python_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
%check
|
||||||
|
%python_exec tests.py
|
||||||
%endif
|
%endif
|
||||||
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
|
||||||
|
|
||||||
# Install designer plugin
|
%files %{python_files}
|
||||||
mkdir -p %{buildroot}%{_libdir}/qt4/plugins/designer/python/
|
|
||||||
install -vm 755 %{SOURCE2} %{buildroot}%{_libdir}/qt4/plugins/designer/python/
|
|
||||||
install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
|
|
||||||
|
|
||||||
%fdupes %{buildroot}%{python_sitearch}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc README.rst LICENSE CHANGELOG PKG-INFO examples doc/users/license.rst
|
%doc README.rst LICENSE CHANGELOG PKG-INFO examples doc/users/license.rst
|
||||||
%{python_sitearch}/matplotlib/
|
%{python_sitearch}/matplotlib/
|
||||||
@ -297,121 +257,112 @@ install -vm 755 %{SOURCE3} %{buildroot}%{python_sitearch}/
|
|||||||
%{python_sitearch}/matplotlib-%{version}-py*-nspkg.pth
|
%{python_sitearch}/matplotlib-%{version}-py*-nspkg.pth
|
||||||
%{python_sitearch}/mpl_toolkits
|
%{python_sitearch}/mpl_toolkits
|
||||||
%{python_sitearch}/pylab.py*
|
%{python_sitearch}/pylab.py*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/_backend_gdk.so
|
%pycache_only %{python_sitearch}/__pycache__/pylab.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/_gtkagg.so
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/_tkagg.so
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_cairo.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_cairo.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_cocoaagg.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gdk.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtkagg.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtkcairo.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4.py*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4agg.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt4agg.py*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5agg.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_qt5agg.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_tkagg.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_tkagg.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg_core.*
|
%exclude %{python_sitearch}/matplotlib/backends/backend_webagg_core.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_wx.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/backend_wxagg.*
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/qt_compat.*
|
%exclude %{python_sitearch}/matplotlib/backends/qt_compat.*
|
||||||
|
%exclude %{python_sitearch}/matplotlib/backends/qt_editor/
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/qt4_compat.*
|
%exclude %{python_sitearch}/matplotlib/backends/qt4_compat.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/tkagg.*
|
%exclude %{python_sitearch}/matplotlib/backends/tkagg.*
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/qt_editor/
|
|
||||||
%exclude %{python_sitearch}/matplotlib/backends/web_backend/
|
%exclude %{python_sitearch}/matplotlib/backends/web_backend/
|
||||||
%exclude %{python_sitearch}/mpl_toolkits/gtktools.*
|
%ifpycache
|
||||||
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_cairo.*
|
||||||
%files cairo
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3.*
|
||||||
%defattr(-,root,root,-)
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3agg.*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_cairo.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3cairo.*
|
||||||
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt4.*.py*
|
||||||
%files gtk2
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt4agg.*.py*
|
||||||
%defattr(-,root,root,-)
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5.*
|
||||||
%{python_sitearch}/matplotlib/backends/_backend_gdk.so
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5agg.*
|
||||||
%{python_sitearch}/matplotlib/backends/_gtkagg.so
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_tkagg.*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gdk.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg.*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtk.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg_core.*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtkagg.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/qt_compat.*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtkcairo.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/qt4_compat.*
|
||||||
%{python_sitearch}/mpl_toolkits/gtktools.*
|
%exclude %{python_sitearch}/matplotlib/backends/__pycache__/tkagg.*
|
||||||
|
%endif
|
||||||
%if 0%{?suse_version} != 1110
|
%ifpython2
|
||||||
%files gtk3
|
%exclude %{python_sitearch}/matplotlib/backends/backend_wx.py*
|
||||||
%defattr(-,root,root,-)
|
%exclude %{python_sitearch}/matplotlib/backends/backend_wxagg.py*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtk3.*
|
%exclude %{python_sitearch}/matplotlib/backends/wx_compat.py*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtk3agg.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/backend_gtk3cairo.*
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} != 1110
|
|
||||||
|
%files %{python_files cairo}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_cairo.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_cairo.*.py*
|
||||||
|
|
||||||
|
%files %{python_files gtk3}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_gtk3.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_gtk3agg.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_gtk3cairo.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3agg.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_gtk3cairo.*.py*
|
||||||
|
|
||||||
# Dummy package to pull in latex dependencies.
|
# Dummy package to pull in latex dependencies.
|
||||||
%files latex
|
%files %{python_files latex}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc doc/users/usetex.rst
|
%doc doc/users/usetex.rst
|
||||||
%endif
|
|
||||||
|
|
||||||
# IMPORTANT: the qt4 backend makes use of the qt5 backend,
|
|
||||||
# which is actually a generic qt backend.
|
|
||||||
# So we need to package all the qt5 stuff in this generic
|
|
||||||
# package, and provide a stub package which pulls in the
|
|
||||||
# python-qt5 dependency.
|
|
||||||
|
|
||||||
%files qt-shared
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{python_sitearch}/matplotlib/backends/backend_qt5.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/backend_qt5agg.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/qt_compat.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/qt4_compat.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/qt_editor/
|
|
||||||
|
|
||||||
%files qt4
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{python_sitearch}/matplotlib/backends/backend_qt4.*
|
|
||||||
%{python_sitearch}/matplotlib/backends/backend_qt4agg.*
|
|
||||||
|
|
||||||
%files designer
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%dir %{_libdir}/qt4/
|
|
||||||
%dir %{_libdir}/qt4/plugins/
|
|
||||||
%dir %{_libdir}/qt4/plugins/designer/
|
|
||||||
%dir %{_libdir}/qt4/plugins/designer/python/
|
|
||||||
%{_libdir}/qt4/plugins/designer/python/matplotlibplugin.py
|
|
||||||
%{python_sitearch}/matplotlibwidget.py
|
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64
|
|
||||||
%if 0%{?suse_version} >= 1315 && 0%{?is_opensuse} != 0
|
|
||||||
%files qt5
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
# IMPORTANT: the qt4 backend makes use of the qt5 backend,
|
# IMPORTANT: the qt4 backend makes use of the qt5 backend,
|
||||||
# which is actually a generic qt backend.
|
# which is actually a generic qt backend.
|
||||||
# So we need to package all the qt5 stuff in a generic
|
# So we need to package all the qt5 stuff in a generic
|
||||||
# package, and provide this stub package which pulls in the
|
# package, and provide the -1t5 stub package which pulls in
|
||||||
# python-qt5 dependency.
|
# the python-qt5 dependency.
|
||||||
|
%files %{python_files qt-shared}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_qt5.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_qt5agg.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/qt4_compat.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/qt_compat.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/qt_editor/
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt5agg.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/qt4_compat.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/qt_compat.*.py*
|
||||||
|
|
||||||
|
%files %{python_files qt4}
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_qt4.py*
|
||||||
|
%{python_sitearch}/matplotlib/backends/backend_qt4agg.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt4.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_qt4agg.*.py*
|
||||||
|
|
||||||
|
%files %{python_files qt5}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files tk
|
%files %{python_files tk}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{python_sitearch}/matplotlib/backends/backend_tkagg.*
|
%{python_sitearch}/matplotlib/backends/backend_tkagg.py*
|
||||||
%{python_sitearch}/matplotlib/backends/tkagg.*
|
%{python_sitearch}/matplotlib/backends/tkagg.py*
|
||||||
%{python_sitearch}/matplotlib/backends/_tkagg.so
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_tkagg.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/tkagg.*.py*
|
||||||
|
|
||||||
%files web
|
%files %{python_files web}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{python_sitearch}/matplotlib/backends/backend_webagg.*
|
%{python_sitearch}/matplotlib/backends/backend_webagg.py*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_webagg_core.*
|
%{python_sitearch}/matplotlib/backends/backend_webagg_core.py*
|
||||||
%{python_sitearch}/matplotlib/backends/web_backend/
|
%{python_sitearch}/matplotlib/backends/web_backend/
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg.*.py*
|
||||||
|
%pycache_only %{python_sitearch}/matplotlib/backends/__pycache__/backend_webagg_core.*.py*
|
||||||
|
|
||||||
%if 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315 || 0%{?suse_version} >= 1315 && 0%{?is_opensuse} != 0
|
%files -n %{python2_prefix}-matplotlib-wx
|
||||||
%files wx
|
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{python_sitearch}/matplotlib/backends/backend_wx.*
|
%{python2_sitearch}/matplotlib/backends/wx_compat.py*
|
||||||
%{python_sitearch}/matplotlib/backends/backend_wxagg.*
|
%{python2_sitearch}/matplotlib/backends/backend_wx.py*
|
||||||
%endif
|
%{python2_sitearch}/matplotlib/backends/backend_wxagg.py*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user