python-systemd/python-systemd.spec

78 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

2015-07-08 19:26:34 +00:00
Name: python-systemd
2022-08-16 14:20:17 +00:00
Version: 235
2022-08-16 14:13:08 +00:00
Release: %autorelease
2022-08-16 14:20:17 +00:00
Summary: Python module wrapping libsystemd functionality
2015-07-08 19:26:34 +00:00
2023-08-07 10:59:55 +00:00
License: LGPL-2.1-or-later
2015-07-08 19:26:34 +00:00
URL: https://github.com/systemd/python-systemd
2015-10-28 14:16:28 +00:00
Source0: https://github.com/systemd/python-systemd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
2015-07-08 19:26:34 +00:00
BuildRequires: make
BuildRequires: gcc
2015-07-08 19:26:34 +00:00
BuildRequires: systemd-devel
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-sphinx
2015-07-09 00:27:45 +00:00
BuildRequires: web-assets-devel
2015-10-27 12:29:38 +00:00
BuildRequires: python3-pytest
2015-07-08 19:26:34 +00:00
%global _description %{expand:
2022-08-16 14:20:17 +00:00
Python module for native access to the libsystemd 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 the library is also wrapped.}
2016-09-22 11:15:13 +00:00
%description %_description
2015-07-08 19:26:34 +00:00
%package -n python3-systemd
Summary: %{summary}
%{?python_provide:%python_provide python3-systemd}
2015-07-08 19:26:34 +00:00
Provides: systemd-python3 = %{version}-%{release}
Provides: systemd-python3%{?_isa} = %{version}-%{release}
Obsoletes: systemd-python3 < 230
2016-09-22 11:15:13 +00:00
%description -n python3-systemd %_description
2015-07-08 19:26:34 +00:00
2015-11-15 22:23:19 +00:00
%package doc
Summary: HTML documentation for %{name}
Requires: js-jquery
%description doc
%{summary}.
2015-07-08 19:26:34 +00:00
%prep
2016-01-24 21:01:31 +00:00
%autosetup -p1
sed -i 's/py\.test/pytest/' Makefile
2015-07-08 19:26:34 +00:00
%build
2015-07-08 19:55:48 +00:00
make PYTHON=%{__python3} build
make PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
rm -r build/html/.buildinfo build/html/.doctrees
2015-07-08 19:26:34 +00:00
%install
2015-07-08 19:55:48 +00:00
%make_install PYTHON=%{__python3}
2015-07-09 00:27:45 +00:00
mkdir -p %{buildroot}%{_pkgdocdir}
cp -rv build/html %{buildroot}%{_pkgdocdir}/
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
2015-10-27 12:29:38 +00:00
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
2016-09-22 11:15:13 +00:00
make PYTHON=%{__python3} check
2015-07-08 19:26:34 +00:00
%files -n python3-systemd
%license LICENSE.txt
2015-07-08 19:55:48 +00:00
%doc %{_pkgdocdir}
2015-11-15 22:23:19 +00:00
%exclude %{_pkgdocdir}/html
2016-09-22 11:15:13 +00:00
%{python3_sitearch}/systemd/
%{python3_sitearch}/systemd_python*.egg-info
2015-07-08 19:26:34 +00:00
2015-11-15 22:23:19 +00:00
%files doc
%doc %{_pkgdocdir}/html
2015-07-08 19:26:34 +00:00
%changelog
2022-08-16 14:13:08 +00:00
%autochangelog