From d8e65497e07ae5bc8c4044d877d42635341c0b12316c06afa213e2d1daed51bd Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Tue, 10 Oct 2017 12:48:07 +0000 Subject: [PATCH] Accepting request 532553 from home:sebix:branches:devel:languages:python - singlespec OBS-URL: https://build.opensuse.org/request/show/532553 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-systemd?expand=0&rev=12 --- python-systemd.changes | 5 +++++ python-systemd.spec | 42 +++++++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/python-systemd.changes b/python-systemd.changes index cd65e9f..c0d4d16 100644 --- a/python-systemd.changes +++ b/python-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 7 13:20:19 UTC 2017 - sebix+novell.com@sebix.at + +- singlespec + ------------------------------------------------------------------- Mon Jun 26 09:17:01 UTC 2017 - jweberhofer@weberhofer.at diff --git a/python-systemd.spec b/python-systemd.spec index 3b5b6ca..975be43 100644 --- a/python-systemd.spec +++ b/python-systemd.spec @@ -16,6 +16,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test Name: python-systemd Version: 234 Release: 0 @@ -26,20 +28,26 @@ Url: https://github.com/systemd/python-systemd Source: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE exclude-tests-on-obs.patch removes a test when running tests at OBS. Should be removed as soon as OBS is fixed Patch100: exclude-tests-on-obs.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkgconfig -BuildRequires: python-Sphinx -BuildRequires: python-devel -BuildRequires: python-pytest -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros BuildRequires: systemd-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: systemd +Suggests: %{name}-doc +# SECTION docs +BuildRequires: python3-Sphinx +# /SECTION +%if %{with test} +BuildRequires: %{python_module pytest} +%endif +%python_subpackages -%package doc +%package -n %{name}-doc Summary: Documentation for python-systemd -# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines" -Group: Documentation +Group: Documentation/HTML Requires: %{name} = %{version} %description @@ -49,7 +57,7 @@ Python module for native access to the systemd facilities. Functionality is sepe * systemd.id128 provides functions for querying machine and boot identifiers and a lists of message identifiers provided by systemd, * systemd.login wraps parts of libsystemd used to query logged in users and available seats and machines. -%description doc +%description -n %{name}-doc Documentation and help files for python-systemd. %prep @@ -57,24 +65,24 @@ Documentation and help files for python-systemd. %patch100 -p1 %build -make %{?_smp_mflags} build +%{python_expand make PYTHON=$python %{?_smp_mflags} build} make %{?_smp_mflags} sphinx-html rm -r build/html/.buildinfo build/html/.doctrees build/html/_sources %install -%make_install -%fdupes %{buildroot}/%{python_sitearch} +%{python_expand %make_install PYTHON=$python +%fdupes %{buildroot}/%{$python_sitearch}} +%if %{with test} %check -make %{?_smp_mflags} check +%{python_expand make PYTHON=$python %{?_smp_mflags} check} +%endif -%files -%defattr(-,root,root,-) +%files %{python_files} %doc LICENSE.txt README.md %{python_sitearch}/* -%files doc -%defattr(-,root,root) +%files -n %{name}-doc %doc build/html %changelog