Blame SPECS/python-decorator.spec

0ca74c
%if 0%{?fedora}
0ca74c
%global with_python3 1
0ca74c
%else
0ca74c
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
0ca74c
%endif
0ca74c
0ca74c
Name:           python-decorator
0ca74c
Version:        3.4.0
0ca74c
Release:        3%{?dist}
0ca74c
Summary:        Module to simplify usage of decorators
0ca74c
0ca74c
Group:          Development/Languages
0ca74c
License:        BSD
0ca74c
URL:            http://pypi.python.org/pypi/decorator/
0ca74c
Source0:        http://pypi.python.org/packages/source/d/decorator/decorator-%{version}.tar.gz
0ca74c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0ca74c
0ca74c
BuildArch:      noarch
0ca74c
BuildRequires:  python2-devel
0ca74c
BuildRequires:  python-setuptools
0ca74c
BuildRequires:  python-nose
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
BuildRequires: python3-devel
0ca74c
BuildRequires: python3-setuptools
0ca74c
%endif
0ca74c
0ca74c
%description
0ca74c
The aim of the decorator module is to simplify the usage of decorators for
0ca74c
the average programmer, and to popularize decorators usage giving examples
0ca74c
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
0ca74c
etc.  The core of this module is a decorator factory called decorator.
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
%package -n python3-decorator
0ca74c
Summary:        Module to simplify usage of decorators in python3
0ca74c
Group:          Development/Languages
0ca74c
0ca74c
%description -n python3-decorator
0ca74c
The aim of the decorator module is to simplify the usage of decorators for
0ca74c
the average programmer, and to popularize decorators usage giving examples
0ca74c
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
0ca74c
etc.  The core of this module is a decorator factory called decorator.
0ca74c
%endif # if with_python3
0ca74c
0ca74c
%prep
0ca74c
%setup -q -n decorator-%{version}
0ca74c
0ca74c
chmod a-x *.txt *.py
0ca74c
%{__sed} -i 's/\r//' README.txt
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
rm -rf %{py3dir}
0ca74c
cp -a . %{py3dir}
0ca74c
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
0ca74c
%endif # with_python3
0ca74c
0ca74c
0ca74c
%build
0ca74c
%{__python} setup.py build
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
pushd %{py3dir}
0ca74c
%{__python3} setup.py build
0ca74c
popd
0ca74c
%endif # with_python3
0ca74c
0ca74c
0ca74c
%install
0ca74c
rm -rf $RPM_BUILD_ROOT
0ca74c
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
pushd %{py3dir}
0ca74c
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
0ca74c
popd
0ca74c
%endif # with_python3
0ca74c
0ca74c
%clean
0ca74c
rm -rf $RPM_BUILD_ROOT
0ca74c
0ca74c
%check
0ca74c
# Until we get the python-multiprocessing backport packaged
0ca74c
%if 0%{?fedora} || 0%{?rhel} > 5
0ca74c
nosetests --with-doctest -e documentation3
0ca74c
%endif
0ca74c
0ca74c
# nose is not Python3 ready yet
0ca74c
%if 0%{?with_python3}
0ca74c
pushd %{py3dir}
0ca74c
PYTHONPATH=$(pwd)/build/lib python3 documentation3.py
0ca74c
popd
0ca74c
%endif # with_python3
0ca74c
0ca74c
%files
0ca74c
%defattr(-,root,root,-)
0ca74c
%doc *.txt documentation.py
0ca74c
%{python_sitelib}/*
0ca74c
0ca74c
%if 0%{?with_python3}
0ca74c
%files -n python3-decorator
0ca74c
%defattr(-,root,root,-)
0ca74c
%doc *.txt documentation3.py
0ca74c
%{python3_sitelib}/*
0ca74c
%endif # with_python3
0ca74c
0ca74c
0ca74c
%changelog
0ca74c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.4.0-3
0ca74c
- Mass rebuild 2013-12-27
0ca74c
0ca74c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-2
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0ca74c
0ca74c
* Thu Oct 18 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 3.4.0-1
0ca74c
- New upstream release
0ca74c
0ca74c
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.3-4
0ca74c
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
0ca74c
0ca74c
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.3-3
0ca74c
- remove rhel logic from with_python3 conditional
0ca74c
0ca74c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.3-2
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0ca74c
0ca74c
* Tue Apr 24 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.3-1
0ca74c
- New upstream release
0ca74c
0ca74c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-2
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0ca74c
0ca74c
* Fri Sep 2 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.2-1
0ca74c
- New upstream release
0ca74c
0ca74c
* Thu Apr 28 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.1-1
0ca74c
- Upstream update 3.3.1 that deprecates the .decorated attribute name in
0ca74c
  favor of .__wrapped__
0ca74c
0ca74c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-2
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0ca74c
0ca74c
* Sat Jan 1 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-1
0ca74c
- Upstream update 3.3.0 that adds function annotation support for python3 code
0ca74c
0ca74c
* Wed Dec 1 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.1-1
0ca74c
- Upstream bugfix 3.2.1
0ca74c
- Enable unittests for python3
0ca74c
0ca74c
* Mon Aug 23 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.0-4
0ca74c
- Rebuild for python-3.2.
0ca74c
0ca74c
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.2.0-3
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
0ca74c
0ca74c
* Wed Jul 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.0-2
0ca74c
- Add documentation.py files to both subpackages (this contains a brief license
0ca74c
  assertion among other things).
0ca74c
* Wed Jun 30 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.0-1
0ca74c
- Minor cleanups
0ca74c
- Upgrade to 3.2.0
0ca74c
- Add python3 subpackage
0ca74c
0ca74c
* Tue Oct 6 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.2-2
0ca74c
- Really include the new source tarball
0ca74c
0ca74c
* Tue Oct 6 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.2-1
0ca74c
- Update to upstream release 3.1.2
0ca74c
0ca74c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-3
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0ca74c
0ca74c
* Sun May 31 2009 Luke Macken <lmacken@redhat.com> - 3.0.1-2
0ca74c
- Only run the test suite on Fedora 11, which has Py2.6 and the multiprocessing
0ca74c
  module.  We can disable this once the compat module is packaged for F10 and
0ca74c
  below.
0ca74c
0ca74c
* Thu May 21 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 3.0.1-1
0ca74c
- Update to upstream release 3.0.1.
0ca74c
0ca74c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.2-2
0ca74c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0ca74c
0ca74c
* Wed Jan 21 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 2.3.2-1
0ca74c
- Update to 2.3.2
0ca74c
- Enable tests via nose
0ca74c
0ca74c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.2.0-2
0ca74c
- Rebuild for Python 2.6