From d198422b9dbfe7bca28fecc26b3d7579735038af Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Wed, 7 Jun 2017 15:14:32 +1000 Subject: [PATCH] Update to 1.2.2 (RHBZ#1389634) --- .gitignore | 1 + 0001-always-obey-GEVENT_NO_CFFI_BUILD.patch | 42 +++++++++++++++++++++ python-gevent.spec | 24 ++++++++++-- sources | 2 +- 4 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 0001-always-obey-GEVENT_NO_CFFI_BUILD.patch diff --git a/.gitignore b/.gitignore index 20703fb..204e622 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ gevent-0.13.0.tar.gz /gevent-1.1.0.tar.gz /gevent-1.1.1.tar.gz /gevent-1.1.2.tar.gz +/gevent-1.2.2.tar.gz diff --git a/0001-always-obey-GEVENT_NO_CFFI_BUILD.patch b/0001-always-obey-GEVENT_NO_CFFI_BUILD.patch new file mode 100644 index 0000000..7f768ec --- /dev/null +++ b/0001-always-obey-GEVENT_NO_CFFI_BUILD.patch @@ -0,0 +1,42 @@ +From 05650624fe2524ecb1bdbbd4facc5d988275e542 Mon Sep 17 00:00:00 2001 +From: Dan Callaghan +Date: Wed, 7 Jun 2017 13:55:53 +1000 +Subject: [PATCH] always obey GEVENT_NO_CFFI_BUILD + +If libev is not embedded, we still want to set GEVENT_NO_CFFI_BUILD=1 to +prevent setup.py from trying to configure libev, regardless whether cffi +modules will actually be built or not. +--- + setup.py | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/setup.py b/setup.py +index 9c229ad..ea4dcaf 100755 +--- a/setup.py ++++ b/setup.py +@@ -90,16 +90,17 @@ + except ImportError: + pass + else: +- if IGNORE_CFFI and not PYPY: +- # Allow distributors to turn off CFFI builds +- # even if it's available, because CFFI always embeds +- # our copy of libev and they may not want that. +- del cffi_modules[:] + # Note that we don't add cffi to install_requires, it's + # optional. We tend to build and distribute wheels with the CFFI + # modules built and they can be imported if CFFI is installed. + # install_requires.append('cffi >= 1.3.0') ++ pass + ++if IGNORE_CFFI and not PYPY: ++ # Allow distributors to turn off CFFI builds ++ # even if it's available, because CFFI always embeds ++ # our copy of libev and they may not want that. ++ del cffi_modules[:] + + # If we are running info / help commands, or we're being imported by + # tools like pyroma, we don't need to build anything +-- +2.9.4 + diff --git a/python-gevent.spec b/python-gevent.spec index a4b6ac1..01625bf 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -3,13 +3,16 @@ %global optflags %(echo %{optflags} -I%{_includedir}/libev) Name: python-%{modname} -Version: 1.1.2 -Release: 5%{?dist} +Version: 1.2.2 +Release: 1%{?dist} Summary: A coroutine-based Python networking library License: MIT URL: http://www.gevent.org/ -Source0: https://github.com/gevent/gevent/releases/download/v%{version}/%{modname}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz + +# https://github.com/gevent/gevent/pull/979 +Patch1: 0001-always-obey-GEVENT_NO_CFFI_BUILD.patch BuildRequires: c-ares-devel BuildRequires: libev-devel @@ -72,13 +75,23 @@ Python 3 version. %prep %autosetup -n %{modname}-%{version} # Remove bundled libraries -rm -rf c-ares libev +rm -r deps +# Upstream intentionally includes C extension sources in the built package, +# because... reasons (PyPy I think?) however we do not want that. Sources will +# go into debuginfo as normal. +sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py %build +export LIBEV_EMBED=0 +export CARES_EMBED=0 +export GEVENT_NO_CFFI_BUILD=1 %py2_build %py3_build %install +export LIBEV_EMBED=0 +export CARES_EMBED=0 +export GEVENT_NO_CFFI_BUILD=1 %py2_install %py3_install rm %{buildroot}%{python2_sitearch}/%{modname}/_*3.py* @@ -99,6 +112,9 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %{python3_sitearch}/%{modname}* %changelog +* Wed Aug 09 2017 Dan Callaghan - 1.2.2-1 +- Update to 1.2.2 (RHBZ#1389634) + * Thu Aug 03 2017 Fedora Release Engineering - 1.1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index eb24331..52fb4b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb32a2f852a4997138014d5007215c6e gevent-1.1.2.tar.gz +SHA512 (gevent-1.2.2.tar.gz) = 1e2dd544cffea62ee32de2e4066b3f4c121058a1211b89da281ec3882f3763217fe2d346ce38b66e27df9f59cfe05bb137d1608a681dd10eaf06a33dc22f531c