14
0
forked from pool/python-stestr

- switch to singlespec cliff package

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-stestr?expand=0&rev=54
This commit is contained in:
2024-01-04 23:07:49 +00:00
committed by Git OBS Bridge
parent 92eef37be9
commit c9e2597077
2 changed files with 18 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 4 23:06:52 UTC 2024 - Dirk Müller <dmueller@suse.com>
- switch to singlespec cliff package
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Dec 4 10:52:17 UTC 2023 - Dirk Müller <dmueller@suse.com> Mon Dec 4 10:52:17 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file # spec file
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -44,6 +44,8 @@ Requires: python-python-subunit >= 1.4.0
Requires: python-testtools >= 2.2.0 Requires: python-testtools >= 2.2.0
Requires: python-tomlkit >= 0.11.6 Requires: python-tomlkit >= 0.11.6
Requires: python-voluptuous >= 0.8.9 Requires: python-voluptuous >= 0.8.9
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch BuildArch: noarch
%if %{with test} %if %{with test}
BuildRequires: %{python_module SQLAlchemy} BuildRequires: %{python_module SQLAlchemy}
@@ -52,11 +54,7 @@ BuildRequires: %{python_module iso8601}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module stestr = %{version}} BuildRequires: %{python_module stestr = %{version}}
%endif %endif
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" Requires: python-cliff
# cliff, required for the cli, is only available for the python3 flavor
Requires: python3-cliff
Requires: python-dbm
%endif
%if !0%{?_no_weakdeps} %if !0%{?_no_weakdeps}
Recommends: python-SQLAlchemy Recommends: python-SQLAlchemy
Recommends: python-subunit2sql >= 1.8.0 Recommends: python-subunit2sql >= 1.8.0
@@ -83,26 +81,28 @@ between the two projects but the actual usage is not exactly the same.
%if %{with test} %if %{with test}
%check %check
export LC_ALL="en_US.UTF8" export LC_ALL="en_US.UTF8"
# can only test in python3: cliff unavailable elsewhere %pytest stestr/tests -v -k 'not test_empty_with_pretty_out'
python3 -B -m pytest stestr/tests -v -k 'not test_empty_with_pretty_out'
%endif %endif
%if ! %{with test} %if ! %{with test}
%build %build
export LC_ALL="en_US.UTF8"
%pyproject_wheel %pyproject_wheel
%install %install
export LC_ALL="en_US.UTF8"
%pyproject_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/stestr
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative stestr
%postun
%python_uninstall_alternative stestr
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc ChangeLog README.rst %doc ChangeLog README.rst
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" %python_alternative %{_bindir}/stestr
%{_bindir}/stestr
%endif
%{python_sitelib}/stestr %{python_sitelib}/stestr
%{python_sitelib}/stestr-%{version}.dist-info %{python_sitelib}/stestr-%{version}.dist-info
%endif %endif