%global srcname pyqtgraph
%global py2_deps python2-PyQt4 python2-numpy python2-pyopengl
%global py3_deps python3-PyQt4 python3-numpy python3-pyopengl
%global sum Scientific Graphics and GUI Library for Python
%global desc \
PyQtGraph is a pure-python graphics and GUI library built on PyQt4 / PySide and\
numpy. It is intended for use in mathematics / scientific /engineering \
applications. Despite being written entirely in python, the library is very \
fast due to its heavy leverage of numpy for number crunching and Qt\'s \
GraphicsView framework for fast display.
Name: python-%{srcname}
Version: 0.10.0
Release: 1%{?dist}
Summary: %{sum}
License: MIT
URL: http://www.pyqtgraph.org/
Source0: http://www.pyqtgraph.org/downloads/%{version}/%{srcname}-%{version}.tar.gz
# git clone https://github.com/pyqtgraph/test-data
# tar -zcf pyqtgraph-test-data-4c7d711.tar.gz test-data
Source1: pyqtgraph-test-data-4c7d711.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python3-devel
# For Tests
BuildRequires: python2-pytest python3-pytest python2-six python3-six
BuildRequires: git-core xorg-x11-server-Xvfb %{py2_deps} %{py3_deps}
%description %{desc}
%package -n python2-%{srcname}
Summary: %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
Requires: %{py2_deps}
%description -n python2-%{srcname} %{desc}
%package -n python3-%{srcname}
Summary: %{sum}
%{?python_provide:%python_provide python3-%{srcname}}
Requires: %{py3_deps}
%description -n python3-%{srcname} %{desc}
%package doc
Summary: Documentation for the %{srcname} library
%description doc
This package provides documentation for the %{srcname} library.
%prep
%autosetup -p1 -n %{srcname}-%{version}
%setup -T -D -b 1 -n %{srcname}-%{version}
mkdir ~/.pyqtgraph
mv ../test-data ~/.pyqtgraph
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
rm -rf %{buildroot}/%{python2_sitelib}/pyqtgraph/examples
rm -rf %{buildroot}/%{python3_sitelib}/pyqtgraph/examples
rm -f doc/build/html/.buildinfo
rm -f doc/build/html/objects.inv
%check
xvfb-run -a py.test-%{python2_version} -k "not (test_ImageItem or test_ImageItem_axisorder or test_PlotCurveItem)"
xvfb-run -a py.test-%{python3_version} -k "not (test_ImageItem or test_ImageItem_axisorder or test_PlotCurveItem)"
%files -n python2-%{srcname}
%license LICENSE.txt
%doc CHANGELOG README.md
%{python2_sitelib}/*
%files -n python3-%{srcname}
%license LICENSE.txt
%doc CHANGELOG README.md
%{python3_sitelib}/*
%files doc
%doc examples doc/build/html
%changelog
* Sun Jul 30 2017 Scott Talbert <swt@techie.net> - 0.10.0-1
- New upstream release 0.10.0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.9.10-12
- Rebuild for Python 3.6
* Wed Jul 20 2016 Scott Talbert <swt@techie.net> - 0.9.10-11
- De-fuzz the disable-failing-tests patch to fix F25 FTBFS
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.10-10
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue Mar 01 2016 Scott Talbert <swt@techie.net> - 0.9.10-9
- Update dependency names
* Sat Feb 06 2016 Scott Talbert <swt@techie.net> - 0.9.10-8
- Cherry-pick a couple of upstream patches to fix test failures on F24 rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Nov 11 2015 Scott Talbert <swt@techie.net> - 0.9.10-6
- Remove pytest path patch on F23+ - fixes FTBFS with Python 3.5
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.10-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Fri Aug 07 2015 Scott Talbert <swt@techie.net> - 0.9.10-4
- Moved documentation to subpackage
* Tue Aug 04 2015 Scott Talbert <swt@techie.net> - 0.9.10-3
- Fix and run tests, move examples to docs, add docs
* Sun Aug 02 2015 Scott Talbert <swt@techie.net> - 0.9.10-2
- Build python2 package also; update to latest python packaging standards
* Fri Jul 31 2015 Scott Talbert <swt@techie.net> 0.9.10-1
- Initial packaging.