%if 0%{?fedora} > 12
%global with_python3 1
%endif
%global modname venusian
%global alphaver a7
Name: python-%{modname}
Version: 1.0
Release: 0.1.%{alphaver}%{?dist}
Summary: A library for deferring decorator actions
Group: Development/Libraries
License: BSD
URL: http://pypi.python.org/pypi/venusian
Source0: http://pypi.python.org/packages/source/v/venusian/%{modname}-%{version}%{alphaver}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-setuptools-devel
BuildRequires: python2-devel
BuildRequires: python-nose
BuildRequires: python-nose-exclude
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose
BuildRequires: python3-nose-exclude
%endif
%description
Venusian is a library which allows framework authors to defer decorator
actions. Instead of taking actions when a function (or class) decorator is
executed at import time, you can defer the action usually taken by the
decorator until a separate "scan" phase.
%if 0%{?with_python3}
%package -n python3-venusian
Summary: A library for deferring decorator actions
Group: Development/Libraries
%description -n python3-venusian
Venusian is a library which allows framework authors to defer decorator
actions. Instead of taking actions when a function (or class) decorator is
executed at import time, you can defer the action usually taken by the
decorator until a separate "scan" phase.
%endif
%prep
%setup -q -n %{modname}-%{version}%{alphaver}
# Remove bundled egg info if it exists
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
rm -rf %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%check
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py nosetests
popd
%endif
%{__python} setup.py nosetests
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.txt LICENSE.txt
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*.egg-info
%if 0%{?with_python3}
%files -n python3-venusian
%doc README.txt LICENSE.txt
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}*.egg-info
%endif
%changelog
* Fri Jan 18 2013 Ralph Bean <rbean@redhat.com> - 1.0-0.1.a7
- Latest upstream version
- Python3 subpackage
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.4.a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Mar 13 2012 Luke Macken <lmacken@redhat.com> - 1.0-0.3.a3
- Bump to alpha3
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.2.a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Oct 28 2011 Luke Macken <lmacken@redhat.com> - 1.0-0.1.a2
- Update to 1.0a2
* Wed Jan 2 2010 Luke Macken <lmacken@redhat.com> - 0.6-1
- Initial package