Spec cleanup and reduce buildrequires
This commit is contained in:
parent
e0411a4362
commit
726486d087
@ -1,26 +1,27 @@
|
|||||||
%if 0%{?fedora}
|
%global pypi_name decorator
|
||||||
%global with_python3 1
|
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||||
|
%bcond_with python3
|
||||||
|
%else
|
||||||
|
%bcond_without python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: python-decorator
|
Name: python-%{pypi_name}
|
||||||
Version: 4.0.10
|
Version: 4.0.10
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Module to simplify usage of decorators
|
Summary: Module to simplify usage of decorators
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://pypi.python.org/pypi/decorator/
|
URL: https://github.com/micheles/decorator
|
||||||
Source0: http://pypi.python.org/packages/source/d/decorator/decorator-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: python-nose
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python2-devel
|
||||||
|
%if %{with python3}
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-devel
|
||||||
%endif
|
%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
|
||||||
@ -38,7 +39,7 @@ 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 0%{?with_python3}
|
%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}
|
||||||
@ -48,54 +49,48 @@ 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 # if with_python3
|
%endif # with python3
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n decorator-%{version}
|
%autosetup -n %{pypi_name}-%{version}
|
||||||
|
|
||||||
chmod a-x *.py
|
|
||||||
%{__sed} -i 's/\r//' docs/README.rst
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{py2_build}
|
%py2_build
|
||||||
|
%if %{with python3}
|
||||||
%if 0%{?with_python3}
|
%py3_build
|
||||||
%{py3_build}
|
%endif # with python3
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{py2_install}
|
%py2_install
|
||||||
|
%if %{with python3}
|
||||||
%if 0%{?with_python3}
|
%py3_install
|
||||||
%{py3_install}
|
%endif # with python3
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
nosetests-%{python2_version} --with-doctest
|
%{__python2} setup.py test
|
||||||
|
%if %{with python3}
|
||||||
|
%{__python3} setup.py test
|
||||||
|
%endif # with python3
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%files -n python2-%{pypi_name}
|
||||||
nosetests-%{python3_version} --with-doctest
|
%doc docs/README.rst
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%files -n python2-decorator
|
|
||||||
%doc docs/README.rst CHANGES.md documentation.pdf
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if %{with python3}
|
||||||
%files -n python3-decorator
|
%files -n python3-%{pypi_name}
|
||||||
%doc docs/README.rst CHANGES.md documentation.pdf
|
%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
|
%endif # with python3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 29 2016 Fabio Alessandro Locati <fale@redhat.com> - 4.0.10-3
|
||||||
|
- SPEC Cleanup
|
||||||
|
- Remove unused build requires
|
||||||
|
|
||||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.10-2
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.10-2
|
||||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user