91 lines
2.8 KiB
RPMSpec
91 lines
2.8 KiB
RPMSpec
Name: python-systemd
|
|
Version: 235
|
|
Release: 1
|
|
Summary: Python module for native access to the systemd facilities.
|
|
License: LGPLv2+
|
|
URL: https://github.com/systemd/%{name}
|
|
Source0: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
BuildRequires: gcc systemd-devel
|
|
|
|
BuildRequires: python3-devel python3-sphinx python3-pytest
|
|
|
|
Obsoletes: python-systemd-doc
|
|
|
|
%description
|
|
Python module wrapping systemd 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 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
|
|
Recommends: %{name}-help
|
|
|
|
%description -n python3-systemd
|
|
Systemed functionality for Python3 Packages.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
sed -i 's/py\.test/pytest/' Makefile
|
|
|
|
%build
|
|
export CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -O2"
|
|
%make_build PYTHON=%{__python3} CFLAGS="$RPM_OPT_FLAGS"
|
|
%make_build PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
|
|
|
|
rm -rf build/html/.buildinfo build/html/.doctrees
|
|
|
|
%install
|
|
%make_install PYTHON=%{__python3}
|
|
|
|
mkdir %{buildroot}%{_pkgdocdir} -p
|
|
cp README.md NEWS %{buildroot}%{_pkgdocdir}/ -p
|
|
cp build/html %{buildroot}%{_pkgdocdir}/ -vr
|
|
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
|
|
|
|
%check
|
|
test -f /run/systemd/journal/stdout || sed -i 's/--doctest[^ ]*//g' pytest.ini
|
|
make check PYTHON=%{__python3}
|
|
|
|
%files -n python3-systemd
|
|
%license LICENSE.*
|
|
%doc %{_pkgdocdir}
|
|
%{python3_sitearch}/systemd/*
|
|
%{python3_sitearch}/systemd*.egg-info
|
|
%exclude %{_pkgdocdir}/html
|
|
|
|
%changelog
|
|
* Mon Oct 24 2022 dongyuzhen <dongyuzhen@h-partners.com> - 235-1
|
|
- upgrade version to 235
|
|
|
|
* Mon Jun 20 2022 renhongxun <renhongxun@h-partners.com> - 234-15
|
|
- add compile option _FORTIFY_SOURCE
|
|
|
|
* Sat Feb 26 2022 shixuantong <shixuantong@h-partners.com> - 234-14
|
|
- fix SystemError:PY_SSIZE_T_CLEAN macro must be defined for '#' formats
|
|
|
|
* Wed Mar 03 2021 shixuantong <shixuantong@huawei.com> - 234-13
|
|
- add debuginfo and debugsource
|
|
|
|
* Fri Feb 19 2021 Zhipeng Xie <xiezhipeng1@huawei.com> - 234-12
|
|
- add release version for rebuild
|
|
|
|
* Thu Oct 29 2020 tianwei <tianwei12@huawei.com> - 234-11
|
|
- delete python2
|
|
|
|
* Fri Mar 6 2020 openEuler Buildteam <buildteam@openeuler.org> - 234-10
|
|
- remove doc package.
|
|
|
|
* Sat Oct 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 234-9
|
|
- optimize spec file.
|
|
|
|
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 234-8
|
|
- Package Init
|