Permalink
Browse files

Proper installation of "libev.h" for it to be found at runtime.

  • Loading branch information...
1 parent 113054a commit 8d92fe70f32945cb24bfb63482e52b2bf9a0f93c @lvella lvella committed Jun 27, 2013
Showing with 8 additions and 2 deletions.
  1. 0 { → gevent}/libev.h
  2. +4 −1 pypycore.py
  3. +4 −1 setup.py
File renamed without changes.
View
@@ -202,14 +202,17 @@ def st_nlink_type():
void ev_sleep (ev_tstamp delay); /* sleep for a while */
""")
+
+include_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),'gevent')
libev = C = ffi.verify(""" // passed to the real C compiler
#include "libev.h"
static void
_gevent_noop(struct ev_loop *_loop, struct ev_timer *w, int revents) { }
void (*gevent_noop)(struct ev_loop *, struct ev_timer *, int) = &_gevent_noop;
-""", include_dirs=[os.path.dirname(os.path.realpath(__file__))], libraries=["ev"])
+""", include_dirs=[include_dir], libraries=["ev"])
+del include_dir
libev.vfd_open = libev.vfd_get = lambda fd: fd
libev.vfd_free = lambda fd: None
View
@@ -9,4 +9,7 @@
setup(name="pypycore",
version="0.1",
py_modules=["pypycore"],
- ext_modules=[pypycore.ffi.verifier.get_extension()])
+ ext_modules=[pypycore.ffi.verifier.get_extension()],
+ packages=["gevent"],
+ package_dir={"gevent": "gevent"},
+ package_data={"gevent": ["libev.h"]})

0 comments on commit 8d92fe7

Please sign in to comment.