Jeroen van Meeuwen (Kolab Systems) ae8f529
%if 0%{?fedora} || 0%{?rhel} >= 8
fbfea14
%global with_python3 1
fbfea14
%endif
fbfea14
Luke Macken 06f9d00
%global modname venusian
16dd424
Luke Macken 06f9d00
Luke Macken 06f9d00
Name:           python-%{modname}
16dd424
Version:        1.2.0
529c6ea
Release:        2%{?dist}
Luke Macken 06f9d00
Summary:        A library for deferring decorator actions
Luke Macken 06f9d00
Luke Macken 06f9d00
License:        BSD
16dd424
URL:            https://pypi.python.org/pypi/venusian
16dd424
Source0:        https://pypi.python.org/packages/source/v/venusian/%{modname}-%{version}.tar.gz
Luke Macken 06f9d00
BuildArch:      noarch
Luke Macken 06f9d00
8fb978c
BuildRequires:  python2-setuptools
Luke Macken 06f9d00
BuildRequires:  python2-devel
16dd424
BuildRequires:  python2-pytest
fbfea14
fbfea14
fbfea14
%if 0%{?with_python3}
bd5a5e7
BuildRequires:  python3-devel
16dd424
BuildRequires:  python3-pytest
bd5a5e7
BuildRequires:  python3-setuptools
fbfea14
%endif
bd5a5e7
Luke Macken 06f9d00
52fe6ed
%global _description\
52fe6ed
Venusian is a library which allows framework authors to defer decorator\
52fe6ed
actions.  Instead of taking actions when a function (or class) decorator is\
52fe6ed
executed at import time, you can defer the action usually taken by the\
52fe6ed
decorator until a separate "scan" phase.\
Luke Macken 06f9d00
bd5a5e7
52fe6ed
%description %_description
52fe6ed
52fe6ed
%package -n python2-venusian
52fe6ed
Summary: %summary
52fe6ed
%{?python_provide:%python_provide python2-venusian}
52fe6ed
52fe6ed
%description -n python2-venusian %_description
52fe6ed
fbfea14
%if 0%{?with_python3}
bd5a5e7
%package -n python3-venusian
bd5a5e7
Summary:        A library for deferring decorator actions
bd5a5e7
bd5a5e7
%description -n python3-venusian
bd5a5e7
Venusian is a library which allows framework authors to defer decorator
bd5a5e7
actions.  Instead of taking actions when a function (or class) decorator is
bd5a5e7
executed at import time, you can defer the action usually taken by the
bd5a5e7
decorator until a separate "scan" phase.
fbfea14
%endif
bd5a5e7
Luke Macken 06f9d00
%prep
16dd424
%setup -q -n %{modname}-%{version}
Luke Macken 06f9d00
bd5a5e7
# Remove bundled egg info if it exists
bd5a5e7
rm -rf %{modname}.egg-info
fbfea14
fbfea14
%if 0%{?with_python3}
bd5a5e7
rm -rf %{py3dir}
bd5a5e7
cp -a . %{py3dir}
fbfea14
%endif
bd5a5e7
16dd424
Luke Macken 06f9d00
%build
3aa87a2
%{__python2} setup.py build
Luke Macken 06f9d00
fbfea14
%if 0%{?with_python3}
bd5a5e7
pushd %{py3dir}
fbfea14
%{__python3} setup.py build
bd5a5e7
popd
fbfea14
%endif
bd5a5e7
Luke Macken 06f9d00
%install
fbfea14
%if 0%{?with_python3}
bd5a5e7
pushd %{py3dir}
fbfea14
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
bd5a5e7
popd
fbfea14
%endif
bd5a5e7
3aa87a2
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
Luke Macken 06f9d00
Luke Macken 06f9d00
%check
fbfea14
%if 0%{?with_python3}
bd5a5e7
pushd %{py3dir}
16dd424
py.test-3
bd5a5e7
popd
fbfea14
%endif
fbfea14
16dd424
py.test-2
16dd424
Luke Macken 06f9d00
52fe6ed
%files -n python2-venusian
16dd424
%license LICENSE.txt
16dd424
%doc README.rst
3aa87a2
%{python2_sitelib}/%{modname}/
3aa87a2
%{python2_sitelib}/%{modname}-%{version}*.egg-info
bd5a5e7
fbfea14
%if 0%{?with_python3}
bd5a5e7
%files -n python3-venusian
16dd424
%license LICENSE.txt
16dd424
%doc README.rst
bd5a5e7
%{python3_sitelib}/%{modname}/
bd5a5e7
%{python3_sitelib}/%{modname}-%{version}*.egg-info
fbfea14
%endif
bd5a5e7
Luke Macken 06f9d00
Luke Macken 06f9d00
%changelog
529c6ea
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
529c6ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
529c6ea
16dd424
* Tue Mar 26 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.2.0-1
16dd424
- Update to 1.2.0.
16dd424
- https://github.com/Pylons/venusian/blob/1.2.0/CHANGES.rst
16dd424
1488d8b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.24.a7
1488d8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1488d8b
3aa87a2
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.0-0.23.a7
3aa87a2
- Use the py2 version of the macros
3aa87a2
83ab947
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.22.a7
83ab947
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
83ab947
2ef8c43
* Sun Jun 17 2018 Miro HronĨok <mhroncok@redhat.com> - 1.0-0.21.a7
2ef8c43
- Rebuilt for Python 3.7
2ef8c43
68b8238
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.20.a7
68b8238
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
68b8238
8fb978c
* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0-0.19.a7
8fb978c
- Update Python 2 dependency declarations to new packaging standards
8fb978c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)