File project.diff of Package python-oslotest

--- python-oslotest.spec.orig
+++ python-oslotest.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package python-oslotest
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,55 +24,68 @@ License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://docs.openstack.org/oslotest
 Source0:        https://files.pythonhosted.org/packages/source/o/oslotest/oslotest-5.0.0.tar.gz
+BuildRequires:  %{python_module debtcollector}
+BuildRequires:  %{python_module fixtures >= 3.0.0}
+BuildRequires:  %{python_module pbr}
+BuildRequires:  %{python_module python-subunit >= 1.0.0}
+BuildRequires:  %{python_module stestr}
+BuildRequires:  %{python_module testtools >= 2.2.0}
+BuildRequires:  fdupes
 BuildRequires:  openstack-macros
-BuildRequires:  python3-debtcollector
-BuildRequires:  python3-fixtures >= 3.0.0
-BuildRequires:  python3-pbr
-BuildRequires:  python3-python-subunit >= 1.0.0
-BuildRequires:  python3-stestr
-BuildRequires:  python3-testtools >= 2.2.0
+BuildRequires:  python-rpm-macros
+Requires:       python-debtcollector
+Requires:       python-fixtures >= 3.0.0
+# NOTE: python-os-client-config is only needed for functional testing
+# Requires:       python-os-client-config
+Requires:       python-python-subunit >= 1.0.0
+Requires:       python-stestr
+Requires:       python-testtools >= 2.2.0
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 
-%description
-The Oslo Test framework provides common fixtures, support for debugging, and
-better support for mocking results.
-
-%package -n python3-oslotest
-Summary:        OpenStack test framework
-Requires:       python3-debtcollector
-Requires:       python3-fixtures >= 3.0.0
-# NOTE: python-os-client-config is only needed for functional testing
-# Requires:       python3-os-client-config
-Requires:       python3-python-subunit >= 1.0.0
-Requires:       python3-stestr
-Requires:       python3-testtools >= 2.2.0
+%python_subpackages
 
-%description -n python3-oslotest
+%description
 The Oslo Test framework provides common fixtures, support for debugging, and
 better support for mocking results.
 
-This package contains the Python 3.x module.
-
 %prep
 %autosetup -p1 -n oslotest-%{version}
 %py_req_cleanup
 
 %build
-%py3_build
+%python_build
 
 %install
-%py3_install
+%python_install
+%python_expand %fdupes %{buildroot}/%{$python_sitelib}
+%python_clone -a %{buildroot}/%{_bindir}/oslo_debug_helper
+%python_clone -a %{buildroot}/%{_bindir}/oslo_run_cross_tests
+%python_clone -a %{buildroot}/%{_bindir}/oslo_run_pre_release_tests
+%fdupes -s %{buildroot}/%{_bindir}
 
 %check
-%{openstack_stestr_run}
+%python_exec -m stestr.cli run
+%python_expand %fdupes %{buildroot}/%{$python_sitelib}
+
+%post
+%python_install_alternative oslo_debug_helper
+%python_install_alternative oslo_run_cross_tests
+%python_install_alternative oslo_run_pre_release_tests
+
+%postun
+%python_uninstall_alternative oslo_debug_helper
+%python_uninstall_alternative oslo_run_cross_tests
+%python_uninstall_alternative oslo_run_pre_release_tests
 
-%files -n python3-oslotest
+%files %{python_files}
 %license LICENSE
 %doc ChangeLog README.rst
-%{_bindir}/oslo_debug_helper
-%{_bindir}/oslo_run_cross_tests
-%{_bindir}/oslo_run_pre_release_tests
-%{python3_sitelib}/oslotest
-%{python3_sitelib}/oslotest*egg-info
+%python_alternative %{_bindir}/oslo_debug_helper
+%python_alternative %{_bindir}/oslo_run_cross_tests
+%python_alternative %{_bindir}/oslo_run_pre_release_tests
+%{python_sitelib}/oslotest
+%{python_sitelib}/oslotest*egg-info
 
 %changelog
openSUSE Build Service is sponsored by