Hello community,

here is the log from the commit of package python-veusz for openSUSE:Factory 
checked in at 2017-08-23 11:55:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-veusz (Old)
 and      /work/SRC/openSUSE:Factory/.python-veusz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-veusz"

Wed Aug 23 11:55:15 2017 rev:37 rq:518247 version:1.26.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-veusz/python-veusz.changes        
2017-05-17 10:55:22.050274077 +0200
+++ /work/SRC/openSUSE:Factory/.python-veusz.new/python-veusz.changes   
2017-08-23 11:55:30.239887948 +0200
@@ -1,0 +2,6 @@
+Fri Aug 11 18:23:57 UTC 2017 - toddrme2...@gmail.com
+
+- Implement singlespec version
+- Fix shebangs
+
+-------------------------------------------------------------------

New:
----
  veusz_256.png

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-veusz.spec ++++++
--- /var/tmp/diff_new_pack.mbEC7R/_old  2017-08-23 11:55:31.391725804 +0200
+++ /var/tmp/diff_new_pack.mbEC7R/_new  2017-08-23 11:55:31.403724115 +0200
@@ -16,30 +16,42 @@
 #
 
 
-%define appname veusz
-%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without  test
+%define         X_display         ":98"
 Name:           python-veusz
 Version:        1.26.1
 Release:        0
 Summary:        Scientific plotting library for Python
+# The entire source code is GPL-2.0+ except helpers/src/_nc_cntr.c which is 
Python-2.0
 License:        GPL-2.0+ and Python-2.0
 Group:          Productivity/Scientific/Other
-# The entire source code is GPL-2.0+ except helpers/src/_nc_cntr.c which is 
Python-2.0
 Url:            https://veusz.github.io/
-Source0:        
https://github.com/veusz/veusz/releases/download/%{appname}-%{version}/%{appname}-%{version}.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/v/veusz/veusz-%{version}.tar.gz
+Source3:        veusz_256.png
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module numpy-devel}
+BuildRequires:  %{python_module qt4-devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module sip}
 BuildRequires:  desktop-file-utils
 BuildRequires:  fdupes
+BuildRequires:  hicolor-icon-theme
 BuildRequires:  libqt4-devel
-BuildRequires:  python-devel
-BuildRequires:  python-h5py
-BuildRequires:  python-numpy-devel
-BuildRequires:  python-qt4-devel
-BuildRequires:  python-setuptools
-BuildRequires:  python-sip
-Requires:       python-h5py
+BuildRequires:  python-rpm-macros
+BuildRequires:  update-desktop-files
+%if %{with test}
+BuildRequires:  %{python_module h5py}
+BuildRequires:  xorg-x11-server
+%endif
 Requires:       python-numpy
 Requires:       python-qt4
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Recommends:     python-h5py
+%ifpython3
+Recommends:     veusz
+%endif
+
+%python_subpackages
 
 %description
 Veusz is a scientific plotting package, designed to create
@@ -49,42 +61,104 @@
 plotting functions, data with errors, keys, labels, stacked plots,
 multiple plots, contours, shapes and fitting data.
 
-This package provides only the python module needed for
-scripting using python.
+%package -n veusz
+Summary:        GUI scientific plotting package
+Group:          Productivity/Scientific/Other
+Requires:       python3-veusz = %{version}
+Requires(post): desktop-file-utils
+Requires(post): shared-mime-info
+Requires(postun): desktop-file-utils
+Requires(postun): shared-mime-info
+Obsoletes:      veusz3 < %{version}
+Provides:       veusz3 = %{version}
+
+%description -n veusz
+Veusz is a scientific plotting package, designed to create
+publication-ready Postscript/PDF/SVG output. It features GUI,
+command-line, and scripting interfaces. Graphs are constructed from
+widgets, allowing complex layouts to be designed. Veusz supports
+plotting functions, data with errors, keys, labels, stacked plots,
+multiple plots, contours, shapes and fitting data.
 
 %prep
 %setup -q -n veusz-%{version}
 find -name \*~ | xargs rm -f
 
 %build
-CFLAGS="%{optflags}"
-python setup.py build
+export CFLAGS="%{optflags}"
+%python_build
 
 %install
-python setup.py install -O1 --skip-build --prefix="%{_prefix}" \
-                                              --root=%{buildroot}
+%python_install
+
+# Install .desktop, mime and appdata files from upstream tarball
+install -Dm0644 support/veusz.appdata.xml 
%{buildroot}%{_datadir}/appdata/veusz.appdata.xml
+install -Dm0644 support/veusz.xml 
%{buildroot}/%{_datadir}/mime/packages/veusz.xml
+desktop-file-install -m 0644 \
+  --dir=%{buildroot}/%{_datadir}/applications/ \
+  --add-category=2DGraphics \
+  support/veusz.desktop
+
+# move icon files to /usr/share/pixmaps/veusz
+%python_expand install -m 0644 %{SOURCE3} 
%{buildroot}%{$python_sitearch}/veusz/icons/veusz_256.png
+mkdir -p %{buildroot}%{_datadir}/pixmaps/veusz
+ln -s %{python3_sitearch}/veusz/icons %{buildroot}%{_datadir}/pixmaps/veusz
+
+# hardlink main veusz icon also into hicolor-icon-theme dir (for desktop file)
+for size in 16 32 48 64 128 256; do
+    odir=%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
+    mkdir -p $odir
+    ln -s %{python3_sitearch}/veusz/icons/veusz_${size}.png ${odir}/veusz.png
+done
+odir=%{buildroot}%{_datadir}/icons/hicolor/scalable/apps
+mkdir -p $odir
+ln -s %{python3_sitearch}/veusz/icons/veusz.svg $odir/veusz.svg
 
 # Mark some scripts as executable.
 # This isn't really needed, but Veusz includes shebangs in scripts
 # so that they can be run when not installed.
 # Do this so that the scripts don't need modification.
-chmod +x %{buildroot}%{python_sitearch}/veusz/veusz_main.py
-chmod +x %{buildroot}%{python_sitearch}/veusz/veusz_listen.py
-
-install -m0644 COPYING %{buildroot}%{python_sitearch}/veusz/
 
-%fdupes -s %{buildroot}%{python_sitearch}
-%fdupes %{buildroot}%{_datadir}/pixmaps/%{appname}/
+# install man pages
+mkdir -p %{buildroot}%{_mandir}/man1
+install -p Documents/veusz.1 Documents/veusz_listen.1 -m 0644 \
+        %{buildroot}%{_mandir}/man1
+        
+%{python_expand chmod a+x %{buildroot}%{$python_sitearch}/veusz/veusz_main.py
+chmod a+x %{buildroot}%{$python_sitearch}/veusz/veusz_listen.py
+sed -i "s|#!/usr/bin/env python|#!%__$python|" 
%{buildroot}%{$python_sitearch}/veusz/veusz_main.py
+sed -i "s|#!/usr/bin/env python|#!%__$python|" 
%{buildroot}%{$python_sitearch}/veusz/veusz_listen.py
+sed -i "s|#!/usr/bin/env python|#!%__$python|" 
%{buildroot}%{$python_sitearch}/veusz/examples/embedexample.py
+# Deduplicating files can generate a RPMLINT warning for pyc mtime
+$python -m compileall -d %{$python_sitearch} 
%{buildroot}%{$python_sitearch}/veusz/
+$python -O -m compileall -d %{$python_sitearch} 
%{buildroot}%{$python_sitearch}/veusz/
+$python -m compileall -d %{$python_sitearch} 
%{buildroot}%{$python_sitearch}/veusz/examples/
+$python -O -m compileall -d %{$python_sitearch} 
%{buildroot}%{$python_sitearch}/veusz/examples/
+%fdupes %{buildroot}%{$python_sitearch}
+}
+
+%if %{with test}
+%check
+export DISPLAY=%{X_display}
+Xvfb %{X_display} >& Xvfb.log &
+trap "kill $! || true" EXIT
+sleep 5
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
+$python -B tests/runselftest.py
+}
+%endif
+
+%post -n veusz
+update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
+update-desktop-database %{_datadir}/applications
+%icon_theme_cache_post
+
+%postun -n veusz
+update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
+update-desktop-database %{_datadir}/applications
+%icon_theme_cache_postun
 
-# CLEAN-UP __pycache__ DIRS CONTAINING OBJECT FILES LEFT BY %%check WITHOUT 
THE CORRESPONDING SOURCES
-rm -fr %{buildroot}%{python3_sitearch}/veusz/*/__pycache__
-rm -fr %{buildroot}%{python3_sitearch}/veusz/__pycache__
-
-# Drop GUI binaries, install python3-veusz for the GUI application instead
-rm %{buildroot}%{_bindir}/%{appname}
-rm %{buildroot}%{_bindir}/%{appname}_listen
-
-%files
+%files %{python_files}
 %defattr(-,root,root)
 %doc README AUTHORS COPYING ChangeLog
 %doc Documents/manual.html
@@ -92,4 +166,17 @@
 %{python_sitearch}/veusz-%{version}-py*.egg-info
 %{python_sitearch}/veusz/
 
+%files -n veusz
+%defattr(-,root,root)
+%doc AUTHORS COPYING
+%{_bindir}/veusz
+%{_bindir}/veusz_listen
+%{_mandir}/man1/*
+%{_datadir}/applications/veusz.desktop
+%{_datadir}/pixmaps/veusz/
+%dir %{_datadir}/appdata
+%{_datadir}/appdata/veusz.appdata.xml
+%{_datadir}/icons/hicolor/*/apps/veusz.*
+%{_datadir}/mime/packages/veusz.xml
+
 %changelog


Reply via email to