[pypy-commit] cffi shortername: tweak how to pass define_macros, shorten module name to not go over 260 chars

mattip pypy.commits at gmail.com
Sat Jan 4 17:13:21 EST 2020


Author: Matti Picus <matti.picus at gmail.com>
Branch: shortername
Changeset: r3318:6fb2ee84a9da
Date: 2020-01-05 00:12 +0200
http://bitbucket.org/cffi/cffi/changeset/6fb2ee84a9da/

Log:	tweak how to pass define_macros, shorten module name to not go over
	260 chars

diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst
--- a/doc/source/whatsnew.rst
+++ b/doc/source/whatsnew.rst
@@ -83,7 +83,7 @@
   Like before, `Issue #350`_ mentions a workaround if you still want
   the ``Py_LIMITED_API`` flag and *either* you are not concerned about
   virtualenv *or* you are sure your module will not be used on CPython
-  <= 3.4: pass ``define_macros=[("Py_LIMITED_API", None)]`` to the
+  <= 3.4: pass ``define_macros=[("Py_LIMITED_API", None)]`` as a keyword to the
   ``ffibuilder.set_source()`` call.
 
 
@@ -155,8 +155,8 @@
 * CPython 3 on Windows: we no longer compile with ``Py_LIMITED_API``
   by default because such modules cannot be used with virtualenv.
   `Issue #350`_ mentions a workaround if you still want that and are not
-  concerned about virtualenv: pass a ``define_macros=[("Py_LIMITED_API",
-  None)]`` to the ``ffibuilder.set_source()`` call.
+  concerned about virtualenv: pass ``define_macros=[("Py_LIMITED_API",
+  None)]`` as a keyword to the ``ffibuilder.set_source()`` call.
 
 .. _`Issue #345`: https://bitbucket.org/cffi/cffi/issues/345/
 .. _`Issue #350`: https://bitbucket.org/cffi/cffi/issues/350/
diff --git a/testing/cffi0/test_zdistutils.py b/testing/cffi0/test_zdistutils.py
--- a/testing/cffi0/test_zdistutils.py
+++ b/testing/cffi0/test_zdistutils.py
@@ -89,7 +89,7 @@
         csrc = '/*hi there %s!2*/\n#include <math.h>\n' % self
         v = Verifier(ffi, csrc, force_generic_engine=self.generic,
                      libraries=[self.lib_m])
-        basename = self.__class__.__name__ + 'test_compile_module'
+        basename = self.__class__.__name__[:10] + '_test_compile_module'
         v.modulefilename = filename = str(udir.join(basename + '.so'))
         v.compile_module()
         assert filename == v.modulefilename


More information about the pypy-commit mailing list