Commit 93e73bad authored by Jason Madden's avatar Jason Madden

We need EV_COMMON for the CFFI embedded case.

parent dd7d123a
......@@ -141,7 +141,7 @@ jobs:
# libev builds a manpage each time, and it includes today's date, so it frequently changes.
# delete to avoid repacking the archive
- rm -rf $BUILD_LIBS/share/man/
- ls -l $BUILD_LIBS $BUILD_LIBS/lib
- ls -l $BUILD_LIBS $BUILD_LIBS/lib $BUILD_LIBS/include
- pip install --no-build-isolation .[test]
- objdump -p src/gevent/libev/*so
script:
......
......@@ -85,7 +85,9 @@ def build_extension():
if LIBEV_EMBED:
CORE.define_macros += [('LIBEV_EMBED', '1'),
('EV_COMMON', ''), # we don't use void* data
# we don't use void* data in the cython implementation;
# the CFFI implementation does and removes this line.
('EV_COMMON', ''),
# libev watchers that we don't use currently:
('EV_CLEANUP_ENABLE', '0'),
('EV_EMBED_ENABLE', '0'),
......
......@@ -70,12 +70,19 @@ _source = read_source('_corecffi_source.c')
distutils_ext = _setuplibev.build_extension()
macros = list(distutils_ext.define_macros)
try:
# We need the data pointer.
macros.remove(('EV_COMMON', ''))
except ValueError:
pass
ffi.cdef(_cdef)
ffi.set_source(
'gevent.libev._corecffi',
_source,
include_dirs=distutils_ext.include_dirs,
define_macros=distutils_ext.define_macros,
include_dirs=distutils_ext.include_dirs + [thisdir], # "libev.h"
define_macros=macros,
libraries=distutils_ext.libraries,
)
......
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