Author: Armin Rigo <[email protected]>
Branch: cffi-1.0
Changeset: r2044:a96e6eedc5cd
Date: 2015-05-18 13:39 +0200
http://bitbucket.org/cffi/cffi/changeset/a96e6eedc5cd/

Log:    Initialize the __name__ and __file__ arguments when we're about to
        execfile() the build script

diff --git a/cffi/setuptools_ext.py b/cffi/setuptools_ext.py
--- a/cffi/setuptools_ext.py
+++ b/cffi/setuptools_ext.py
@@ -42,7 +42,7 @@
                 rewritten + ':' + ffi_var_name,)
         error("%r does not name an existing file%s" % (build_file_name, ext))
 
-    mod_vars = {}
+    mod_vars = {'__name__': '__cffi__', '__file__': build_file_name}
     execfile(build_file_name, mod_vars)
 
     try:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to