Compare commits

..

No commits in common. "c9" and "c8" have entirely different histories.
c9 ... c8

3 changed files with 66 additions and 59 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/decorator-4.4.2.tar.gz SOURCES/decorator-4.2.1.tar.gz

View File

@ -1 +1 @@
24d4560ff3e89a6cec068d323383577343c086fb SOURCES/decorator-4.4.2.tar.gz 49cc187e145d974e89a89d4f1529be9b77296806 SOURCES/decorator-4.2.1.tar.gz

View File

@ -1,18 +1,36 @@
%global pypi_name decorator %global pypi_name decorator
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 4.4.2 Version: 4.2.1
Release: 6%{?dist} Release: 2%{?dist}
Summary: Module to simplify usage of decorators Summary: Module to simplify usage of decorators
License: BSD License: BSD
URL: https://github.com/micheles/decorator URL: https://github.com/micheles/decorator
Source0: %pypi_source decorator Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
%if %{with python2}
BuildRequires: python2-setuptools
BuildRequires: python2-devel
%endif
%if %{with python3}
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-devel BuildRequires: python3-devel
%endif # with python3
%description %description
The aim of the decorator module is to simplify the usage of decorators for The aim of the decorator module is to simplify the usage of decorators for
@ -20,6 +38,19 @@ the average programmer, and to popularize decorators usage giving examples
of useful decorators, such as memoize, tracing, redirecting_stdout, locked, of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
etc. The core of this module is a decorator factory called decorator. etc. The core of this module is a decorator factory called decorator.
%if %{with python2}
%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.
%endif
%if %{with python3}
%package -n python3-decorator %package -n python3-decorator
Summary: Module to simplify usage of decorators in python3 Summary: Module to simplify usage of decorators in python3
%{?python_provide:%python_provide python3-decorator} %{?python_provide:%python_provide python3-decorator}
@ -29,80 +60,56 @@ The aim of the decorator module is to simplify the usage of decorators for
the average programmer, and to popularize decorators usage giving examples the average programmer, and to popularize decorators usage giving examples
of useful decorators, such as memoize, tracing, redirecting_stdout, locked, of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
etc. The core of this module is a decorator factory called decorator. etc. The core of this module is a decorator factory called decorator.
%endif # with python3
%prep %prep
%autosetup -p1 -n %{pypi_name}-%{version} %autosetup -n %{pypi_name}-%{version}
%build %build
%if %{with python2}
%py2_build
%endif
%if %{with python3}
%py3_build %py3_build
%endif # with python3
%install %install
%if %{with python2}
%py2_install
%endif
%if %{with python3}
%py3_install %py3_install
%endif # with python3
# Remove this when https://github.com/micheles/decorator/issues/32 is fixed. # Remove this when https://github.com/micheles/decorator/issues/32 is fixed.
find %{buildroot} -name SOURCES.txt~ -exec rm -f {} \; find %{buildroot} -name SOURCES.txt~ -exec rm -f {} \;
%check %check
%if %{with python2}
%{__python2} setup.py test
%endif
%if %{with python3}
%{__python3} setup.py test %{__python3} setup.py test
%endif # with python3
%if %{with python2}
%files -n python2-%{pypi_name}
%doc docs/README.rst
%license LICENSE.txt
%{python2_sitelib}/*
%endif
%if %{with python3}
%files -n python3-%{pypi_name} %files -n python3-%{pypi_name}
%doc README.rst CHANGES.md %doc docs/README.rst
%license LICENSE.txt %license LICENSE.txt
%{python3_sitelib}/decorator.py %{python3_sitelib}/decorator.py
%{python3_sitelib}/decorator-*.egg-info/ %{python3_sitelib}/decorator-*.egg-info/
%{python3_sitelib}/__pycache__/* %{python3_sitelib}/__pycache__/*
%endif # with python3
%changelog %changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.4.2-6 * Mon Jun 25 2018 <lbalhar@redhat.com> - 4.2.1-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Python 2 subpackage disabled by default
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.4.2-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 4.4.2-2
- Rebuilt for Python 3.9
* Fri Apr 03 2020 Michal Konečný <mkonecny@redhat.com> - 4.4.2-1
- new version
Remove python39.patch no longer needed
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* 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)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 4.4.0-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Jun 22 2019 Kevin Fenzi <kevin@scrye.com> - 4.4.0-1
- Update to 4.4.0. Fixes bug #1669189
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 4.3.0-1
- Update to 4.3.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-2
- Rebuilt for Python 3.7
* Wed Feb 7 2018 Haïkel Guémar <hguemar@fedoraproject.org> - 4.2.1-1 * Wed Feb 7 2018 Haïkel Guémar <hguemar@fedoraproject.org> - 4.2.1-1
- Upstream 4.2.1 - Upstream 4.2.1