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
This commit is contained in:
Jan Matejek 2017-10-10 12:48:07 +00:00 committed by Git OBS Bridge
parent 2687d2df82
commit d8e65497e0
2 changed files with 30 additions and 17 deletions

View File

@ -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

View File

@ -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