Author: Armin Rigo <ar...@tunes.org>
Branch: demo-cleanup
Changeset: r2544:c5133d5b81fe
Date: 2016-01-07 16:55 +0100
http://bitbucket.org/cffi/cffi/changeset/c5133d5b81fe/

Log:    tweaks

diff --git a/demo/xclient.py b/demo/xclient.py
--- a/demo/xclient.py
+++ b/demo/xclient.py
@@ -1,14 +1,8 @@
 import sys, os
 
-# If the build script was run immediately before this script, the cffi module
-# ends up in the current directory. Make sure we can import it.
-sys.path.append('.')
+# run xclient_build first, then make sure the shared object is on sys.path
+from _xclient_cffi import ffi, lib
 
-try:
-    from _xclient import ffi, lib
-except ImportError:
-    print 'run xclient_build first, then make sure the shared object is on 
sys.path'
-    sys.exit(-1)
 
 # ffi "knows" about the declared variables and functions from the
 #     cdef parts of the module xclient_build created,
diff --git a/demo/xclient_build.py b/demo/xclient_build.py
--- a/demo/xclient_build.py
+++ b/demo/xclient_build.py
@@ -17,10 +17,9 @@
 int XNextEvent(Display *display, XEvent *event_return);
 """)
 
-ffi.set_source('_xclient', """
+ffi.set_source('_xclient_cffi', """
             #include <X11/Xlib.h>
 """, libraries=['X11'])
 
 if __name__ == '__main__':
     ffi.compile()
-
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to