1. Python CFFI
  2. Untitled project
  3. cffi

Commits

Maciej Fijalkowski  committed b8eb8ed

fixes

  • Participants
  • Parent commits e43094a
  • Branches default

Comments (0)

Files changed (3)

File README.md

View file
  • Ignore whitespace
 -------
 
 [Mailing list](https://groups.google.com/forum/#!forum/python-cffi)
+
+To run tests under CPython, run:
+
+python setup.py build_ext -i

File cffi/cparser.py

View file
  • Ignore whitespace
 
 from . import api, model
 from .commontypes import COMMON_TYPES, resolve_common_type
-import pycparser.c_parser, weakref, re, sys
+try:
+    from cffi import _pycparser as pycparser
+except ImportError:
+    import pycparser
+import weakref, re, sys
 
 try:
     if sys.version_info < (3,):
                     nextenumvalue = self._parse_constant(enum.value)
                 enumvalues.append(nextenumvalue)
                 nextenumvalue += 1
-            enumvalues = tuple(enumvalues) 
+            enumvalues = tuple(enumvalues)
             tp = model.EnumType(explicit_name, enumerators, enumvalues)
             tp.partial = partial
         else:   # opaque enum

File testing/test_zintegration.py

View file
  • Ignore whitespace
             site_packages = dirpath
             break
     if site_packages:
-        for module in ('cffi', '_cffi_backend', 'pycparser', 'ply'):
+        for module in ('cffi', '_cffi_backend', 'pycparser'):
             target = imp.find_module(module)[1]
             os.symlink(target, os.path.join(site_packages,
                                             os.path.basename(target)))