15
0

Accepting request 576828 from home:TheBlackCat:branches:devel:languages:python

- Add use_pylons_theme.patch
  update docs to use pylons-sphinx-themes package instead of git
  submodule update.  Based on:
  * bb4c396b23

OBS-URL: https://build.opensuse.org/request/show/576828
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-translationstring?expand=0&rev=12
This commit is contained in:
2018-02-14 18:52:07 +00:00
committed by Git OBS Bridge
parent 69fa577c2d
commit 18e347c287
3 changed files with 206 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-translationstring
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -24,15 +24,18 @@ Release: 0
Summary: Utility library for i18n relied on by various Repoze and Pyramid packages
License: SUSE-Repoze
Group: Development/Languages/Python
Url: http://www.repoze.org
Url: https://github.com/Pylons/translationstring
Source: https://files.pythonhosted.org/packages/source/t/translationstring/translationstring-%{version}.tar.gz
# PATCH-FIX-UPSTREAM use_pylons_theme.patch -- Use pylons_sphinx_theme from external package
Patch0: use_pylons_theme.patch
BuildRequires: %{python_module setuptools}
# SECTION documentation requirements
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pylons-sphinx-themes}
# /SECTION
BuildRequires: fdupes
BuildRequires: git
BuildRequires: python-rpm-macros
# SECTION documentation requirements
BuildRequires: python3-Sphinx
BuildRequires: python3-pylons-sphinx-themes
# /SECTION
BuildArch: noarch
%python_subpackages
@@ -57,24 +60,28 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n translationstring-%{version}
%patch0 -p1
# drop build date from doc to fix build-compare
sed -i "s/\(html_last_updated_fmt = \).*/\\1None/" docs/conf.py
rm -rf translationstring.egg-info
%build
%python_build
pushd docs && make html && rm _build/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Need package installed before building docs
pushd docs && PYTHONPATH=%{buildroot}%{python3_sitelib} make html && rm _build/html/.buildinfo
popd
%check
%python_exec setup.py test
%files %{python_files}
%defattr(-,root,root,-)
%doc *.txt
%doc CONTRIBUTORS.txt COPYRIGHT.txt LICENSE.txt README.rst
%{python_sitelib}/*
%files -n %{name}-doc