From 3659bfa0ed6c07f0a0d184dc429e0806770b7bc2a9c90625abe042f37a3e5069 Mon Sep 17 00:00:00 2001 From: Kyrill Detinov Date: Mon, 9 Apr 2018 17:57:13 +0000 Subject: [PATCH] Accepting request 594950 from home:Lazy_Kent:devel convert to singlespec OBS-URL: https://build.opensuse.org/request/show/594950 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-djvulibre?expand=0&rev=29 --- python-djvulibre.changes | 7 +++++ python-djvulibre.spec | 63 +++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/python-djvulibre.changes b/python-djvulibre.changes index bfa51af..5aa3725 100644 --- a/python-djvulibre.changes +++ b/python-djvulibre.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 9 17:38:04 UTC 2018 - lazy.kent@opensuse.org + +- Convert to singlespec. +- Disable run tests because of a Ghostscript bug. +- Move examples to the -doc subpackage. + ------------------------------------------------------------------- Thu Aug 11 11:05:04 UTC 2016 - lazy.kent@opensuse.org diff --git a/python-djvulibre.spec b/python-djvulibre.spec index 4c6e750..b47e0ed 100644 --- a/python-djvulibre.spec +++ b/python-djvulibre.spec @@ -1,7 +1,7 @@ # # spec file for package python-djvulibre # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,39 +16,45 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-djvulibre Version: 0.8 Release: 0 Summary: Python Support for the DjVu Image Format -License: GPL-2.0 +License: GPL-2.0-only Group: Development/Libraries/Python -Url: http://jwilk.net/software/python-djvulibre +URL: http://jwilk.net/software/python-djvulibre Source0: https://files.pythonhosted.org/packages/source/p/python-djvulibre/%{name}-%{version}.tar.gz Source1: https://files.pythonhosted.org/packages/source/p/python-djvulibre/%{name}-%{version}.tar.gz.asc Source2: %{name}.keyring +BuildRequires: %{python_module Cython >= 0.19} +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module devel >= 2.6} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: graphviz BuildRequires: graphviz-gnome BuildRequires: pkgconfig -BuildRequires: python-Cython >= 0.19 -BuildRequires: python-Sphinx -BuildRequires: python-devel >= 2.6 +BuildRequires: python-rpm-macros BuildRequires: pkgconfig(ddjvuapi) >= 3.5.21 # Required for tests. +BuildRequires: %{python_module nose} BuildRequires: djvulibre -BuildRequires: python-nose +# Requires: djvulibre >= 3.5.21 -BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%python_subpackages %description python-djvulibre is a set of Python bindings for the DjVuLibre library, an open source implementation of DjVu. -%package doc +%package -n %{name}-doc Summary: Python Support for the DjVu Image Format (Documentation) Group: Documentation/HTML BuildArch: noarch -%description doc +%description -n %{name}-doc python-djvulibre is a set of Python bindings for the DjVuLibre library, an open source implementation of DjVu. @@ -60,34 +66,25 @@ chmod -x examples/* %build export CFLAGS="%{optflags} -fno-strict-aliasing" -python setup.py build -python setup.py build_sphinx +%python_build +%python_build build_sphinx %install -python setup.py install \ - --root=%{buildroot} \ - --prefix=%{_prefix} -install -dm 0755 %{buildroot}%{_defaultdocdir}/%{name}-doc/_images/ -install -dm 0755 %{buildroot}%{_defaultdocdir}/%{name}-doc/_static/ -install -m 0644 build/sphinx/html/{*.html,*.js} \ - %{buildroot}%{_defaultdocdir}/%{name}-doc/ -install -m 0644 build/sphinx/html/_images/* \ - %{buildroot}%{_defaultdocdir}/%{name}-doc/_images/ -install -m 0644 build/sphinx/html/_static/* \ - %{buildroot}%{_defaultdocdir}/%{name}-doc/_static/ +%python_install +rm build/sphinx/html/.buildinfo build/sphinx/html/objects.inv +%fdupes %{buildroot}%{_prefix} -%check -cd tests/ -ln -sf %{buildroot}%{python_sitearch}/djvu/ djvu -python -m nose --verbose +# %%check +# cd tests/ +# ln -sf %%{buildroot}%%{python_sitearch}/djvu/ djvu +# %%python_exec -m nose --verbose -%files -%defattr(-,root,root,-) -%doc doc/{changelog,COPYING,credits.txt} examples/ +%files %{python_files} +%license doc/COPYING +%doc doc/changelog doc/credits.txt %{python_sitearch}/* -%files doc -%defattr(-,root,root,-) -%doc %{_defaultdocdir}/%{name}-doc/ +%files -n %{name}-doc +%doc build/sphinx/html/ examples/ %changelog