forked from pool/python-systemd
- Remove exclude-tests-on-obs.patch, this is not the way how to
do it, besides %python_exec setup.py check doesn't the test suite. - Make tests running properly again OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-systemd?expand=0&rev=21
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-systemd
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without test
|
||||
Name: python-systemd
|
||||
Version: 234
|
||||
Release: 0
|
||||
@@ -28,10 +27,10 @@ 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 iso-c-90.patch makes the building iso-c-90 compatible to allow building on SLE12 SP3
|
||||
Patch1: iso-c-90.patch
|
||||
# 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
|
||||
# PATCH-FIX-UPSTREAM reader: make PY_SSIZE_T_CLEAN
|
||||
Patch101: 0002-reader-make-PY_SSIZE_T_CLEAN.patch
|
||||
# PATCH-FIX-UPSTREAM 0002-reader-make-PY_SSIZE_T_CLEAN.patch gh#systemd/python-systemd#107 mcepl@suse.com
|
||||
# Originally from gh#systemd/python-systemd/commit/c71bbac357f0
|
||||
# make PY_SSIZE_T_CLEAN
|
||||
Patch2: 0002-reader-make-PY_SSIZE_T_CLEAN.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -42,9 +41,7 @@ BuildRequires: pkgconfig(libsystemd)
|
||||
Requires: systemd
|
||||
Suggests: %{name}-doc
|
||||
# /SECTION
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -62,15 +59,16 @@ Python module for native access to the systemd facilities. Functionality is sepe
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%fdupes %{buildroot}
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_exec setup.py check
|
||||
%endif
|
||||
export PYTEST_ADDOPTS="-k 'not test_reader_this_machine'"
|
||||
%python_expand make PYTHON=python%{$python_version} check
|
||||
|
||||
%files %{python_files}
|
||||
%doc LICENSE.txt README.md
|
||||
%{python_sitearch}/*
|
||||
%license LICENSE.txt
|
||||
%doc README.md
|
||||
%{python_sitearch}/systemd
|
||||
%{python_sitearch}/systemd_python-%{version}*-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user