Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%endif

%global modname venusian
%global alphaver a7

Name:           python-%{modname}
Version:        1.0
Release:        0.16.%{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
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
%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

%files
%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
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.16.a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.0-0.15.a7
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.14.a7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.13.a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.12.a7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.11.a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.10.a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0-0.9.a7
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Fri Dec 06 2013 Pierre-Yves Chibon <pingou@pingoured>fr - 1.0-0.8-a7
- Change BR from python-setuptools-devel to python-setuptools
  See https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.7.a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 21 2013 Ralph Bean <rbean@redhat.com> - 1.0-0.6.a7
- Reintroduce conditionals to maintain cross-packaging with el6.

* Thu Feb 21 2013 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-0.5.a7
- Bump release so a7 is higher than the a3 in F18+
- Drop Fedora 12 conditionals as it's long gone
- Modernise spec

* 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