124 lines
3.8 KiB
RPMSpec
124 lines
3.8 KiB
RPMSpec
Name: python-systemd
|
|
Version: 231
|
|
Release: 3%{?dist}
|
|
Summary: Python module wrapping systemd functionality
|
|
|
|
License: LGPLv2+
|
|
URL: https://github.com/systemd/python-systemd
|
|
Source0: https://github.com/systemd/python-systemd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
BuildRequires: systemd-devel
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-sphinx
|
|
BuildRequires: web-assets-devel
|
|
BuildRequires: pytest
|
|
BuildRequires: python3-pytest
|
|
|
|
%global _docdir_fmt %{name}
|
|
|
|
%description
|
|
Python module for native access to the systemd facilities.
|
|
Functionality includes sending of structured messages to the journal
|
|
and reading journal files, querying machine and boot identifiers and a
|
|
lists of message identifiers provided by systemd. Other functionality
|
|
provided by libsystemd is also wrapped.
|
|
|
|
%package -n python2-systemd
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python2-systemd}
|
|
Provides: systemd-python = %{version}-%{release}
|
|
Provides: systemd-python%{?_isa} = %{version}-%{release}
|
|
Obsoletes: systemd-python < 230
|
|
Conflicts: python3-systemd < %{version}-%{release}
|
|
Recommends: %{name}-doc
|
|
|
|
%description -n python2-systemd
|
|
Python module for native access to the systemd facilities.
|
|
Functionality includes sending of structured messages to the journal
|
|
and reading journal files, querying machine and boot identifiers and a
|
|
lists of message identifiers provided by systemd. Other functionality
|
|
provided by libsystemd is also wrapped.
|
|
|
|
This is the version for Python 2.
|
|
|
|
%package -n python3-systemd
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python3-systemd}
|
|
Provides: systemd-python3 = %{version}-%{release}
|
|
Provides: systemd-python3%{?_isa} = %{version}-%{release}
|
|
Obsoletes: systemd-python3 < 230
|
|
Conflicts: python2-systemd < %{version}-%{release}
|
|
Recommends: %{name}-doc
|
|
|
|
%description -n python3-systemd
|
|
Python module for native access to the systemd facilities.
|
|
Functionality includes sending of structured messages to the journal
|
|
and reading journal files, querying machine and boot identifiers and a
|
|
lists of message identifiers provided by systemd. Other functionality
|
|
provided by libsystemd is also wrapped.
|
|
|
|
This is the version for Python 3.
|
|
|
|
%package doc
|
|
Summary: HTML documentation for %{name}
|
|
Requires: js-jquery
|
|
|
|
%description doc
|
|
%{summary}.
|
|
|
|
%prep
|
|
%autosetup
|
|
|
|
%build
|
|
make PYTHON=%{__python2} build
|
|
make PYTHON=%{__python3} build
|
|
make PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
|
|
rm -r build/html/.buildinfo build/html/.doctrees
|
|
|
|
%install
|
|
%make_install PYTHON=%{__python2}
|
|
%make_install PYTHON=%{__python3}
|
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
cp -rv build/html %{buildroot}%{_pkgdocdir}/
|
|
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
|
|
cp -p README.md NEWS %{buildroot}%{_pkgdocdir}/
|
|
|
|
%check
|
|
# if the socket is not there, skip doc tests
|
|
test -f /run/systemd/journal/stdout || \
|
|
sed -i 's/--doctest[^ ]*//g' pytest.ini
|
|
make PYTHON=%{__python2} check || :
|
|
make PYTHON=%{__python3} check || :
|
|
|
|
%files -n python2-systemd
|
|
%license LICENSE.txt
|
|
%doc %{_pkgdocdir}
|
|
%exclude %{_pkgdocdir}/html
|
|
%{python2_sitearch}/*
|
|
|
|
%files -n python3-systemd
|
|
%license LICENSE.txt
|
|
%doc %{_pkgdocdir}
|
|
%exclude %{_pkgdocdir}/html
|
|
%{python3_sitearch}/*
|
|
|
|
%files doc
|
|
%doc %{_pkgdocdir}/html
|
|
|
|
%changelog
|
|
* Sun Nov 15 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 231-3
|
|
- Split out doc subpackage (#1242619)
|
|
- Do not allow installation of python-systemd in different versions
|
|
|
|
* Sat Nov 07 2015 Robert Kuska <rkuska@redhat.com> - 231-2
|
|
- Rebuilt for Python3.5 rebuild
|
|
|
|
* Tue Oct 27 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@laptop> - 231-1
|
|
- Update to latest version
|
|
|
|
* Mon Jul 6 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@laptop> - 230-1
|
|
- Initial packaging
|