File project.diff of Package python-debtcollector
--- python-debtcollector.spec.orig
+++ python-debtcollector.spec
@@ -24,32 +24,22 @@ License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/debtcollector/latest/
Source0: https://files.pythonhosted.org/packages/source/d/debtcollector/debtcollector-3.0.0.tar.gz
+BuildRequires: %{python_module fixtures}
+BuildRequires: %{python_module pbr}
+BuildRequires: %{python_module python-subunit}
+BuildRequires: %{python_module stestr}
+BuildRequires: %{python_module wrapt >= 1.7.0}
+BuildRequires: fdupes
BuildRequires: openstack-macros
-BuildRequires: python3-fixtures
-BuildRequires: python3-pbr
-BuildRequires: python3-python-subunit
-BuildRequires: python3-stestr
-BuildRequires: python3-wrapt >= 1.7.0
+BuildRequires: python-rpm-macros
+Requires: python-importlib-metadata
+Requires: python-pbr
+Requires: python-wrapt >= 1.7.0
BuildArch: noarch
-%description
-A collection of Python deprecation patterns and strategies that help
-you collect your technical debt in a non-destructive manner. The goal
-of this library is to provide well documented developer facing
-deprecation patterns that start of with a basic set and can expand
-into a larger set of patterns as time goes on. The desired output of
-these patterns is to apply the warnings module to emit
-DeprecationWarning or PendingDeprecationWarning or similar derivative
-to developers using libraries (or potentially applications) about
-future deprecations.
-
-%package -n python3-debtcollector
-Summary: A collection of Python deprecation patterns and strategies
-Requires: python3-importlib-metadata
-Requires: python3-pbr
-Requires: python3-wrapt >= 1.7.0
+%python_subpackages
-%description -n python3-debtcollector
+%description
A collection of Python deprecation patterns and strategies that help
you collect your technical debt in a non-destructive manner. The goal
of this library is to provide well documented developer facing
@@ -60,13 +50,13 @@ DeprecationWarning or PendingDeprecation
to developers using libraries (or potentially applications) about
future deprecations.
-This package contains the Python 3.x module.
+This package contains the Python %{python_version} module.
%package -n python-debtcollector-doc
Summary: Documentation for %{name}
Group: Documentation/HTML
-BuildRequires: python3-Sphinx
-BuildRequires: python3-openstackdocstheme
+BuildRequires: %{python_module Sphinx}
+BuildRequires: %{python_module openstackdocstheme}
%description -n python-debtcollector-doc
A collection of Python deprecation patterns and strategies that help
@@ -86,7 +76,7 @@ This package contains documentation in H
%py_req_cleanup
%build
-%py3_build
+%python_build
# generate html doc
PBR_VERSION=3.0.0 %sphinx_build -b html doc/source doc/build/html
@@ -94,16 +84,17 @@ PBR_VERSION=3.0.0 %sphinx_build -b html
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
-%{openstack_stestr_run}
+%python_exec -m stestr.cli run
%install
-%py3_install
+%python_install
+%python_expand %fdupes %{buildroot}/%{$python_sitelib}/
-%files -n python3-debtcollector
+%files %{python_files}
%license LICENSE
%doc README.rst
-%{python3_sitelib}/debtcollector
-%{python3_sitelib}/debtcollector-*.egg-info
+%{python_sitelib}/debtcollector
+%{python_sitelib}/debtcollector-*.egg-info
%files -n python-debtcollector-doc
%license LICENSE