[pypy-commit] cffi cffi-1.0: rewrites
arigo
noreply at buildbot.pypy.org
Mon May 18 13:42:38 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r2046:7600c89e80a6
Date: 2015-05-18 13:43 +0200
http://bitbucket.org/cffi/cffi/changeset/7600c89e80a6/
Log: rewrites
diff --git a/doc/source/cdef.rst b/doc/source/cdef.rst
--- a/doc/source/cdef.rst
+++ b/doc/source/cdef.rst
@@ -722,11 +722,10 @@
import to "work" even if the ``_foo`` module was not generated.)
Writing a ``setup.py`` script that works both with CFFI 0.9 and 1.0
-requires explicitly checking the version of CFFI that we are going to
-download and install---which we can assume is the latest one unless
-we're running on PyPy::
+requires explicitly checking the version of CFFI that we can have---it
+is hard-coded as a built-in module in PyPy::
- if '_cffi_backend' in sys.builtin_module_names: # pypy
+ if '_cffi_backend' in sys.builtin_module_names: # PyPy
import _cffi_backend
requires_cffi = "cffi==" + _cffi_backend.__version__
else:
@@ -736,7 +735,7 @@
``setup()`` as needed, e.g.::
if requires_cffi.startswith("cffi==0."):
- # backward compatibility: we require "cffi==0.*"
+ # backward compatibility: we have "cffi==0.*"
from package.foo_build import ffi
extra_args = dict(
ext_modules=[ffi.verifier.get_extension()],
@@ -744,6 +743,7 @@
)
else:
extra_args = dict(
+ setup_requires=[requires_cffi],
cffi_modules=['package/foo_build.py:ffi'],
)
setup(
More information about the pypy-commit
mailing list