Commit 14544dae authored by Jason Madden's avatar Jason Madden

Use environment markers to install cffi on windows.

Also try working around all the failed builds that pip 10 created: https://ci.appveyor.com/project/denik/gevent/build/1.0.1667/job/9jarsdxb6y0x2smd
parent 38b9f54f
......@@ -7,7 +7,8 @@
1.3b2 (unreleased)
==================
- Nothing changed yet.
- On Windows, CFFI is now a dependency so that the libuv backend
really can be used by default.
1.3b1 (2018-04-13)
......
......@@ -125,8 +125,8 @@ install:
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
# Note that psutil won't build under PyPy on Windows.
- "%CMD_IN_ENV% pip install -U cython zope.interface zope.event"
- "%CMD_IN_ENV% pip install -U setuptools wheel greenlet cffi dnspython idna requests"
- "%CMD_IN_ENV% %PYEXE% -m pip install -U cython zope.interface zope.event"
- "%CMD_IN_ENV% %PYEXE% -m pip install -U setuptools wheel greenlet cffi dnspython idna requests"
- ps:
if ("${env:PYTHON_ID}" -ne "pypy") {
......
......@@ -190,7 +190,20 @@ greenlet_requires = [
'greenlet >= 0.4.13; platform_python_implementation=="CPython"',
]
install_requires = greenlet_requires + []
# 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.
# We need cffi 1.4.0 for new style callbacks;
# we need cffi 1.11.3 (on CPython 3) to avoid test errors.
# The exception is on Windows, where we want the libuv backend we distribute
# to be the default, and that requires cffi
cffi_requires = [
"cffi >= 1.11.5 ; sys_platform == 'win32'",
]
install_requires = greenlet_requires + cffi_requires
# We use headers from greenlet, so it needs to be installed before we
# can compile. If it isn't already installed before we start
......@@ -204,7 +217,7 @@ install_requires = greenlet_requires + []
# to install the headers at all, AFAICS, we don't need to bother with
# the buggy setup_requires.)
setup_requires = []
setup_requires = cffi_requires + []
if PYPY:
# These use greenlet/greenlet.h, which doesn't exist on PyPy
......@@ -249,18 +262,6 @@ for mod in _to_cythonize:
EXT_MODULES.append(cythonize1(mod))
del _to_cythonize
try:
cffi = __import__('cffi')
except ImportError:
pass
else:
# 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.
# We need cffi 1.4.0 for new style callbacks;
# we need cffi 1.11.3 (on CPython 3) to avoid test errors
# install_requires.append('cffi >= 1.4.0')
pass
if IGNORE_CFFI and not PYPY:
# Allow distributors to turn off CFFI builds
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment