Commit 72164e50 authored by Jason Madden's avatar Jason Madden

Add environment var to skip building libuv backend; use it on manylinux

parent 20c10ca6
...@@ -20,11 +20,13 @@ from setuptools.command.build_ext import build_ext ...@@ -20,11 +20,13 @@ from setuptools.command.build_ext import build_ext
PYPY = hasattr(sys, 'pypy_version_info') PYPY = hasattr(sys, 'pypy_version_info')
WIN = sys.platform.startswith('win') WIN = sys.platform.startswith('win')
CFFI_WIN_BUILD_ANYWAY = os.environ.get("PYPY_WIN_BUILD_ANYWAY")
RUNNING_ON_TRAVIS = os.environ.get('TRAVIS') RUNNING_ON_TRAVIS = os.environ.get('TRAVIS')
RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR') RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR')
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR
LIBRARIES = [] LIBRARIES = []
DEFINE_MACROS = [] DEFINE_MACROS = []
...@@ -82,6 +84,7 @@ def _parse_environ(key): ...@@ -82,6 +84,7 @@ def _parse_environ(key):
'Please set it to 1, 0 or an empty string' % (key, value)) 'Please set it to 1, 0 or an empty string' % (key, value))
IGNORE_CFFI = _parse_environ("GEVENT_NO_CFFI_BUILD") IGNORE_CFFI = _parse_environ("GEVENT_NO_CFFI_BUILD")
SKIP_LIBUV = _parse_environ('GEVENT_NO_LIBUV_BUILD')
def _get_config_value(key, defkey, path=None): def _get_config_value(key, defkey, path=None):
""" """
......
...@@ -14,7 +14,7 @@ if [ -d /gevent -a -d /opt/python ]; then ...@@ -14,7 +14,7 @@ if [ -d /gevent -a -d /opt/python ]; then
rm -rf dist build *.egg-info rm -rf dist build *.egg-info
make clean make clean
$variant/bin/pip install -U cython cffi setuptools greenlet wheel $variant/bin/pip install -U cython cffi setuptools greenlet wheel
PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel GEVENT_NO_LIBUV_BUILD=1 PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel
auditwheel repair dist/*.whl auditwheel repair dist/*.whl
done done
rm -rf dist build *.egg-info rm -rf dist build *.egg-info
......
...@@ -17,6 +17,7 @@ from _setuputils import read_version ...@@ -17,6 +17,7 @@ from _setuputils import read_version
from _setuputils import system from _setuputils import system
from _setuputils import PYPY, WIN from _setuputils import PYPY, WIN
from _setuputils import IGNORE_CFFI from _setuputils import IGNORE_CFFI
from _setuputils import SKIP_LIBUV
from _setuputils import ConfiguringBuildExt from _setuputils import ConfiguringBuildExt
from _setuputils import BuildFailed from _setuputils import BuildFailed
from _setuputils import cythonize1 from _setuputils import cythonize1
...@@ -80,8 +81,10 @@ if not WIN: ...@@ -80,8 +81,10 @@ if not WIN:
LIBEV_CFFI_MODULE LIBEV_CFFI_MODULE
) )
if not SKIP_LIBUV:
cffi_modules.append(LIBUV_CFFI_MODULE) # libuv can't be built on manylinux because it needs glibc >= 2.12
# but manylinux has only 2.5, so we set SKIP_LIBUV in the script make-manylinux
cffi_modules.append(LIBUV_CFFI_MODULE)
if PYPY: if PYPY:
install_requires = [] install_requires = []
......
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