Subpackage python2-decorator has been removed

This commit is contained in:
Miro Hrončok 2020-01-16 11:20:00 +01:00
parent a4139eab24
commit 574a6cd913

View File

@ -1,14 +1,8 @@
%global pypi_name decorator
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
Name: python-%{pypi_name}
Version: 4.4.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Module to simplify usage of decorators
License: BSD
@ -23,13 +17,8 @@ Patch1: python39.patch
BuildArch: noarch
BuildRequires: python2-setuptools
BuildRequires: python2-devel
%if %{with python3}
BuildRequires: python3-setuptools
BuildRequires: python3-devel
%endif
# with python3
%description
The aim of the decorator module is to simplify the usage of decorators for
@ -37,17 +26,6 @@ the average programmer, and to popularize decorators usage giving examples
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
etc. The core of this module is a decorator factory called decorator.
%package -n python2-decorator
Summary: Module to simplify usage of decorators in python2
%{?python_provide:%python_provide python2-decorator}
%description -n python2-decorator
The aim of the decorator module is to simplify the usage of decorators for
the average programmer, and to popularize decorators usage giving examples
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
etc. The core of this module is a decorator factory called decorator.
%if %{with python3}
%package -n python3-decorator
Summary: Module to simplify usage of decorators in python3
%{?python_provide:%python_provide python3-decorator}
@ -57,51 +35,34 @@ The aim of the decorator module is to simplify the usage of decorators for
the average programmer, and to popularize decorators usage giving examples
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
etc. The core of this module is a decorator factory called decorator.
%endif
# with python3
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%py2_build
%if %{with python3}
%py3_build
%endif
# with python3
%install
%py2_install
%if %{with python3}
%py3_install
%endif
# with python3
# Remove this when https://github.com/micheles/decorator/issues/32 is fixed.
find %{buildroot} -name SOURCES.txt~ -exec rm -f {} \;
%check
%{__python2} setup.py test
%if %{with python3}
%{__python3} setup.py test
%endif
# with python3
%files -n python2-%{pypi_name}
%doc README.md CHANGES.md
%license LICENSE.txt
%{python2_sitelib}/*
%if %{with python3}
%files -n python3-%{pypi_name}
%doc README.md CHANGES.md
%license LICENSE.txt
%{python3_sitelib}/decorator.py
%{python3_sitelib}/decorator-*.egg-info/
%{python3_sitelib}/__pycache__/*
%endif
# with python3
%changelog
* Thu Jan 16 2020 Miro Hrončok <mhroncok@redhat.com> - 4.4.0-5
- Subpackage python2-decorator has been removed
See https://fedoraproject.org/wiki/Changes/RetirePython2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.4.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)