a3ad66
%if 0%{?rhel} > 7
a3ad66
# Disable python2 build by default
a3ad66
%bcond_with python2
a3ad66
%else
a3ad66
%bcond_without python2
a3ad66
%endif
a3ad66
a3ad66
%global         modname greenlet
a3ad66
a3ad66
Name:           python-%{modname}
a3ad66
Version:        0.4.13
5fe537
Release:        4%{?dist}
a3ad66
Summary:        Lightweight in-process concurrent programming
a3ad66
License:        MIT
a3ad66
URL:            https://github.com/python-greenlet/greenlet
a3ad66
Source0:        %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
a3ad66
# https://github.com/python-greenlet/greenlet/pull/120
a3ad66
Patch0001:      0001-Don-t-clobber-r2-register-on-ppc64el.patch
a3ad66
a3ad66
%global _description \
a3ad66
The greenlet package is a spin-off of Stackless, a version of CPython\
a3ad66
that supports micro-threads called "tasklets". Tasklets run\
a3ad66
pseudo-concurrently (typically in a single or a few OS-level threads)\
a3ad66
and are synchronized with data exchanges on "channels".
a3ad66
a3ad66
%description %{_description}
a3ad66
a3ad66
%if %{with python2}
a3ad66
%package -n     python2-%{modname}
a3ad66
Summary:        %{summary}
a3ad66
%{?python_provide:%python_provide python2-%{modname}}
a3ad66
BuildRequires:  python2-devel
a3ad66
BuildRequires:  python2-setuptools
a3ad66
a3ad66
%description -n python2-%{modname} %{_description}
a3ad66
a3ad66
Python 2 version.
a3ad66
%endif # with python2
a3ad66
a3ad66
%package -n     python3-%{modname}
a3ad66
Summary:        %{summary}
a3ad66
%{?python_provide:%python_provide python3-%{modname}}
a3ad66
BuildRequires:  python3-devel
a3ad66
BuildRequires:  python3-setuptools
a3ad66
a3ad66
%description -n python3-%{modname} %{_description}
a3ad66
a3ad66
Python 3 version.
a3ad66
a3ad66
%if %{with python2}
a3ad66
%package -n     python2-%{modname}-devel
a3ad66
Summary:        C development headers for python2-%{modname}
a3ad66
%{?python_provide:%python_provide python2-%{modname}-devel}
a3ad66
Requires:       python2-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
a3ad66
a3ad66
%description -n python2-%{modname}-devel
a3ad66
%{summary}.
a3ad66
a3ad66
Python 2 version.
a3ad66
%endif # with python2
a3ad66
a3ad66
%package -n     python3-%{modname}-devel
a3ad66
Summary:        C development headers for python3-%{modname}
a3ad66
%{?python_provide:%python_provide python3-%{modname}-devel}
a3ad66
Requires:       python3-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
a3ad66
a3ad66
%description -n python3-%{modname}-devel
a3ad66
%{summary}.
a3ad66
a3ad66
Python 3 version.
a3ad66
a3ad66
%prep
a3ad66
%autosetup -n %{modname}-%{version} -p1
a3ad66
a3ad66
%build
a3ad66
%if %{with python2}
a3ad66
%py2_build
a3ad66
%endif # with python2
a3ad66
%py3_build
a3ad66
a3ad66
%install
a3ad66
%if %{with python2}
a3ad66
%py2_install
a3ad66
%endif # with python2
a3ad66
%py3_install
a3ad66
 
a3ad66
%check
a3ad66
%if %{with python2}
a3ad66
%{__python2} setup.py test
a3ad66
%endif # with python2
a3ad66
%{__python3} setup.py test
a3ad66
a3ad66
%if %{with python2}
a3ad66
%files -n python2-%{modname}
a3ad66
%license LICENSE LICENSE.PSF
a3ad66
%doc AUTHORS NEWS README.rst
a3ad66
%{python2_sitearch}/%{modname}-*.egg-info
a3ad66
%{python2_sitearch}/%{modname}.so
a3ad66
a3ad66
%files -n python2-%{modname}-devel
a3ad66
%{_includedir}/python%{python2_version}*/%{modname}/
a3ad66
%endif # with python2
a3ad66
a3ad66
%files -n python3-%{modname}
a3ad66
%license LICENSE LICENSE.PSF
a3ad66
%doc AUTHORS NEWS README.rst
a3ad66
%{python3_sitearch}/%{modname}-*.egg-info
a3ad66
%{python3_sitearch}/%{modname}*.so
a3ad66
a3ad66
%files -n python3-greenlet-devel
a3ad66
%{_includedir}/python%{python3_version}*/%{modname}/
a3ad66
a3ad66
%changelog
5fe537
* Thu Nov 07 2019 Brian C. Lane <bcl@redhat.com> - 0.4.13-4
5fe537
- Add gating tests
5fe537
  Resolves: rhbz#1682344
5fe537
a3ad66
* Wed Jul 18 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.4.13-3
a3ad66
- Conditionalize the python2 subpackage
a3ad66
a3ad66
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.13-2
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a3ad66
a3ad66
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.13-1
a3ad66
- Update to 0.4.13
a3ad66
a3ad66
* Fri Jan 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.12-1
a3ad66
- Update to 0.4.12
a3ad66
a3ad66
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-5
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a3ad66
a3ad66
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-4
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a3ad66
a3ad66
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-3
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a3ad66
a3ad66
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.11-2
a3ad66
- Rebuild for Python 3.6
a3ad66
a3ad66
* Sun Dec 11 2016 Kevin Fenzi <kevin@scrye.com> - 0.4.11-1
a3ad66
- Update to 0.4.11. Fixes bug #1403514
a3ad66
a3ad66
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.9-2
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
a3ad66
a3ad66
* Sun Oct 25 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.9-1
a3ad66
- Update to 0.4.9
a3ad66
- Use %license macro
a3ad66
- Follow new RPM Packaging guidelines
a3ad66
- Cleanups in spec
a3ad66
a3ad66
* Fri Aug 21 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-2
a3ad66
- Re-enable tests on secondary arches. Fixes #1252899
a3ad66
- Applied patch to build on ppc64le. Fixes #1252900
a3ad66
a3ad66
* Fri Jun 26 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-1
a3ad66
- Update to 0.4.7. Fixes bug #1235896
a3ad66
a3ad66
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-2
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a3ad66
a3ad66
* Sun Mar 29 2015 Terje Røsten <terje.rosten@ntnu.no> - 0.4.5-1
a3ad66
- 0.4.5
a3ad66
- Add python3 subpackage
a3ad66
- Ship license files
a3ad66
- Some spec clean ups
a3ad66
- Update fixes FTBFS issue (bz#1106779)
a3ad66
- Add comment about issues on ppc64, s390 & s390x
a3ad66
a3ad66
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a3ad66
a3ad66
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-2
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3ad66
a3ad66
* Thu Jan 23 2014 Orion Poplawski <orion@cora.nwra.com> 0.4.2-1
a3ad66
- Update to 0.4.2
a3ad66
a3ad66
* Mon Aug 05 2013 Kevin Fenzi <kevin@scrye.com> 0.4.1-1
a3ad66
- Update to 0.4.1
a3ad66
- Fix FTBFS bug #993134
a3ad66
a3ad66
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a3ad66
a3ad66
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a3ad66
a3ad66
* Fri Jan 18 2013 Pádraig Brady <P@draigBrady.com> - 0.4.0-1
a3ad66
- Update to 0.4.0
a3ad66
a3ad66
* Thu Oct 11 2012 Pádraig Brady <P@draigBrady.com> - 0.3.1-11
a3ad66
- Add support for ppc64
a3ad66
a3ad66
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-10
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a3ad66
a3ad66
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-9
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a3ad66
a3ad66
* Fri Nov 25 2011 Dan Horák <dan[at]danny.cz> - 0.3.1-8
a3ad66
- disable tests also for s390(x)
a3ad66
a3ad66
* Thu Nov 17 2011 Pádraig Brady <P@draigBrady.com> - 0.3.1-7
a3ad66
- Fix %%check quoting in the previous comment which when
a3ad66
  left with a single percent sign, pulled in "unset DISPLAY\n"
a3ad66
  into the changelog
a3ad66
a3ad66
* Mon Oct 24 2011 Pádraig Brady <P@draigBrady.com> - 0.3.1-6
a3ad66
- cherrypick 25bf29f4d3b7 from upstream (rhbz#746771)
a3ad66
- exclude the %%check from ppc where the tests segfault
a3ad66
a3ad66
* Wed Oct 19 2011 David Malcolm <dmalcolm@redhat.com> - 0.3.1-5
a3ad66
- add a %%check section
a3ad66
- cherrypick 2d5b17472757 from upstream (rhbz#746771)
a3ad66
a3ad66
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-4
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a3ad66
a3ad66
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.1-3
a3ad66
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a3ad66
a3ad66
* Wed Apr 14 2010 Lev Shamardin <shamardin@gmail.com> - 0.3.1-2
a3ad66
- Splitted headers into a -devel package.
a3ad66
a3ad66
* Fri Apr 09 2010 Lev Shamardin <shamardin@gmail.com> - 0.3.1-1
a3ad66
- Initial package version.