Accepting request 1046639 from devel:languages:python

- Fix doc build: primary python not in buildset for backports
  15.4_py39
- Move to PEP517 (forwarded request 1046638 from bnavigator)

OBS-URL: https://build.opensuse.org/request/show/1046639
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-manuel?expand=0&rev=13
This commit is contained in:
Dominique Leuenberger 2023-01-05 13:59:47 +00:00 committed by Git OBS Bridge
commit 05337f7b48
2 changed files with 25 additions and 13 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 3 18:56:12 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Fix doc build: primary python not in buildset for backports
15.4_py39
- Move to PEP517
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 17 09:00:30 UTC 2022 - pgajdos@suse.com Mon Oct 17 09:00:30 UTC 2022 - pgajdos@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-manuel # spec file for package python-manuel
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# Copyright (c) 2013-2018 LISA GmbH, Bingen, Germany. # Copyright (c) 2013-2018 LISA GmbH, Bingen, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -17,20 +17,22 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-manuel Name: python-manuel
Version: 1.12.4 Version: 1.12.4
Release: 0 Release: 0
Summary: Python module to build tested documentation Summary: Python module to build tested documentation
License: Apache-2.0 License: Apache-2.0
URL: https://pypi.org/project/manuel/ URL: https://pypi.org/project/manuel/
# SourceRepository: https://github.com/benji-york/manuel
Source: https://files.pythonhosted.org/packages/source/m/manuel/manuel-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/m/manuel/manuel-%{version}.tar.gz
# add fixed sphinx config <hpj@urpla.net> # add fixed sphinx config <hpj@urpla.net>
Source1: conf.py Source1: conf.py
# https://github.com/benji-york/manuel/issues/33 # https://github.com/benji-york/manuel/issues/33
Patch0: python-manuel-no-six.patch Patch0: python-manuel-no-six.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildArch: noarch BuildArch: noarch
@ -59,17 +61,20 @@ This package contains documentation files for %{name}.
cp %{SOURCE1} . cp %{SOURCE1} .
%build %build
%python_build %pyproject_wheel
%{python_expand # build docs only one time with primary python3 flavor # build docs only one time
if [ $(which $python) -ef $(which python3) ]; then python3 setup.py build_sphinx
$python setup.py build_sphinx mv build/sphinx/html docs
rm build/sphinx/html/.buildinfo rm docs/.buildinfo
fi
}
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %{python_expand #
%fdupes %{buildroot}%{$python_sitelib}
mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
}
%check %check
%pytest src/manuel/tests.py %pytest src/manuel/tests.py
@ -78,9 +83,9 @@ fi
%license LICENSE.rst %license LICENSE.rst
%doc CHANGES.rst COPYRIGHT.rst PKG-INFO README.rst %doc CHANGES.rst COPYRIGHT.rst PKG-INFO README.rst
%{python_sitelib}/manuel %{python_sitelib}/manuel
%{python_sitelib}/manuel-%{version}*-info %{python_sitelib}/manuel-%{version}.dist-info
%files %{python_files doc} %files %{python_files doc}
%doc build/sphinx/html %doc %{_docdir}/%{python_prefix}-manuel-doc
%changelog %changelog