Luke Macken c1696c3
%global modname crank
Luke Macken c1696c3
acfc88e
%if 0%{?rhel} && 0%{?rhel} <= 7
acfc88e
%global with_python3 0
acfc88e
%else
acfc88e
%global with_python3 1
acfc88e
%endif
acfc88e
Luke Macken c1696c3
Name:               python-crank
05860e3
Version:            0.8.1
19eaf10
Release:            6%{?dist}
Luke Macken c1696c3
Summary:            Generalization of dispatch mechanism for use across frameworks
Luke Macken c1696c3
Luke Macken c1696c3
Group:              Development/Libraries
Luke Macken c1696c3
License:            MIT
05860e3
URL:                https://pypi.io/project/crank
05860e3
Source0:            https://pypi.io/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz
Luke Macken c1696c3
Luke Macken c1696c3
BuildArch:          noarch
Luke Macken c1696c3
Luke Macken c1696c3
BuildRequires:      python2-devel
acfc88e
BuildRequires:      python2-setuptools
acfc88e
%if 0%{?with_python3}
acfc88e
BuildRequires:      python3-devel
acfc88e
BuildRequires:      python3-setuptools
acfc88e
%endif
Luke Macken c1696c3
2fa2a6c
%global _description\
2fa2a6c
Generalization of dispatch mechanism for use across frameworks.
2fa2a6c
2fa2a6c
%description %_description
2fa2a6c
2fa2a6c
%package -n python2-%{modname}
2fa2a6c
Summary: %summary
acfc88e
Provides: python2-crank
2fa2a6c
%{?python_provide:%python_provide python2-%{modname}}
Luke Macken c1696c3
2fa2a6c
%description -n python2-%{modname} %_description
Luke Macken c1696c3
acfc88e
%if 0%{?with_python3}
acfc88e
%package -n python3-%{modname}
acfc88e
Summary:            Generalization of dispatch mechanism for use across python3 web frameworks
acfc88e
Group:              Development/Libraries
acfc88e
acfc88e
%description -n python3-%{modname}
acfc88e
Generalization of dispatch mechanism for use across web frameworks.
acfc88e
acfc88e
This package provides the python3 version of this module
acfc88e
%endif
Luke Macken c1696c3
Luke Macken c1696c3
%prep
Luke Macken c1696c3
%setup -q -n %{modname}-%{version}
Luke Macken c1696c3
Luke Macken c1696c3
# Remove bundled egg-info in case it exists
Luke Macken c1696c3
rm -rf %{modname}.egg-info
Luke Macken c1696c3
acfc88e
%if 0%{?with_python3}
acfc88e
rm -rf %{py3dir}
acfc88e
cp -a . %{py3dir}
acfc88e
%endif # with_python3
acfc88e
Luke Macken c1696c3
Luke Macken c1696c3
%build
acfc88e
%{__python2} setup.py build
acfc88e
acfc88e
%if 0%{?with_python3}
acfc88e
pushd %{py3dir}
acfc88e
%{__python3} setup.py build
acfc88e
popd
acfc88e
%endif # with_python3
Luke Macken c1696c3
Luke Macken c1696c3
Luke Macken c1696c3
%install
acfc88e
%{__python2} setup.py install --skip-build --root=%{buildroot}
acfc88e
acfc88e
%if 0%{?with_python3}
acfc88e
pushd %{py3dir}
acfc88e
%{__python3} setup.py install --skip-build --root=%{buildroot}
acfc88e
popd
acfc88e
%endif # with_python3
Luke Macken c1696c3
Luke Macken c1696c3
Luke Macken c1696c3
# The current upstream tarball doesn't contain the tests
Luke Macken c1696c3
#%check
Luke Macken c1696c3
#%{__python} setup.py test
Luke Macken c1696c3
acfc88e
#%if 0%{?with_python3}
acfc88e
#pushd %{py3dir}
acfc88e
#%{__python3} setup.py test
acfc88e
#popd
acfc88e
#%endif # with_python3
Luke Macken c1696c3
2fa2a6c
%files -n python2-%{modname}
acfc88e
%doc README.rst
acfc88e
%{python2_sitelib}/%{modname}/
acfc88e
%{python2_sitelib}/%{modname}-%{version}*
Luke Macken c1696c3
acfc88e
%if 0%{?with_python3}
acfc88e
%files -n python3-%{modname}
acfc88e
%{python3_sitelib}/%{modname}/
acfc88e
%{python3_sitelib}/%{modname}-%{version}*
acfc88e
%endif
Luke Macken c1696c3
Luke Macken c1696c3
%changelog
19eaf10
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-6
19eaf10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
19eaf10
b2311f5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.8.1-5
b2311f5
- Rebuilt for Python 3.7
b2311f5
3db219c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-4
3db219c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3db219c
2fa2a6c
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.8.1-3
2fa2a6c
- Python 2 binary package renamed to python2-crank
2fa2a6c
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
2fa2a6c
8932321
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-2
8932321
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8932321
05860e3
* Tue Mar 21 2017 Ralph Bean <rbean@redhat.com> - 0.8.1-1
05860e3
- new version
05860e3
8e2ffd9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
8e2ffd9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8e2ffd9
a626d63
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-3
a626d63
- Rebuild for Python 3.6
a626d63
bc146b8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2
bc146b8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
bc146b8
b30d131
* Mon Mar 07 2016 Ralph Bean <rbean@redhat.com> - 0.8.0-1
b30d131
- new version
b30d131
6a657a5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
6a657a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6a657a5
52fd25f
* Sun Dec  6 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 0.7.3-2
acfc88e
- Python3 subpackage
acfc88e
98891e8
* Tue Oct 13 2015 Ralph Bean <rbean@redhat.com> - 0.7.3-1
98891e8
- new version
98891e8
f32558e
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 0.7.2-1
f32558e
- new version
f32558e
9756348
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
9756348
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9756348
0bda5e0
* Wed Aug 20 2014 Ralph Bean <rbean@redhat.com> - 0.7.1-1
0bda5e0
- Latest upstream.
0bda5e0
7cf8b03
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
7cf8b03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7cf8b03
3361da4
* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 0.7.0-1
3361da4
- Latest upstream.
3361da4
e9469ef
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.4-2
e9469ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e9469ef
Luke Macken c1696c3
* Wed Apr 03 2013 Luke Macken <lmacken@redhat.com> 0.6.4-1
Luke Macken c1696c3
- Initial package for Fedora