[pypy-commit] cffi cffi-1.0: more fixes

arigo noreply at buildbot.pypy.org
Tue May 12 11:18:29 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1988:109927668360
Date: 2015-05-12 11:18 +0200
http://bitbucket.org/cffi/cffi/changeset/109927668360/

Log:	more fixes

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -3346,4 +3346,4 @@
 
 def test_version():
     # this test is here mostly for PyPy
-    assert __version__ == "1.0.0b2"
+    assert __version__ == "1.0.0"
diff --git a/cffi/setuptools_ext.py b/cffi/setuptools_ext.py
--- a/cffi/setuptools_ext.py
+++ b/cffi/setuptools_ext.py
@@ -12,7 +12,7 @@
 def add_cffi_module(dist, mod_spec):
     import os
     from cffi.api import FFI
-    from _cffi1 import recompiler
+    from cffi import recompiler
     from distutils.core import Extension
     from distutils.command.build_ext import build_ext
     from distutils.dir_util import mkpath
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -143,9 +143,9 @@
 
 `Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_
 """,
-        version='1.0.0b2',
-        packages=['cffi', '_cffi1'],
-        package_data={'_cffi1': ['_cffi_include.h', 'parse_c_type.h']},
+        version='1.0.0',
+        packages=['cffi'],
+        package_data={'cffi': ['_cffi_include.h', 'parse_c_type.h']},
         zip_safe=False,
 
         url='http://cffi.readthedocs.org',
@@ -162,7 +162,7 @@
 
         entry_points = {
             "distutils.setup_keywords": [
-                "cffi_modules = _cffi1.setuptools_ext:cffi_modules",
+                "cffi_modules = cffi.setuptools_ext:cffi_modules",
             ],
         },
 
diff --git a/testing/cffi0/test_version.py b/testing/cffi0/test_version.py
--- a/testing/cffi0/test_version.py
+++ b/testing/cffi0/test_version.py
@@ -23,7 +23,7 @@
     assert v == _cffi_backend.__version__
 
 def test_doc_version():
-    parent = os.path.dirname(os.path.dirname(__file__))
+    parent = os.path.dirname(os.path.dirname(cffi.__file__))
     p = os.path.join(parent, 'doc', 'source', 'conf.py')
     content = open(p).read()
     #
@@ -32,14 +32,14 @@
     assert ("release = '%s'\n" % v) in content
 
 def test_doc_version_file():
-    parent = os.path.dirname(os.path.dirname(__file__))
+    parent = os.path.dirname(os.path.dirname(cffi.__file__))
     v = cffi.__version__.replace('+', '')
     p = os.path.join(parent, 'doc', 'source', 'index.rst')
     content = open(p).read()
     assert ("cffi/cffi-%s.tar.gz" % v) in content
 
 def test_setup_version():
-    parent = os.path.dirname(os.path.dirname(__file__))
+    parent = os.path.dirname(os.path.dirname(cffi.__file__))
     p = os.path.join(parent, 'setup.py')
     content = open(p).read()
     #
@@ -47,7 +47,7 @@
     assert ("version='%s'" % v) in content
 
 def test_c_version():
-    parent = os.path.dirname(os.path.dirname(__file__))
+    parent = os.path.dirname(os.path.dirname(cffi.__file__))
     v = cffi.__version__
     p = os.path.join(parent, 'c', 'test_c.py')
     content = open(p).read()
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
@@ -18,6 +18,7 @@
     def teardown_class(self):
         if udir.isdir():
             udir.remove(ignore_errors=True)
+        udir.ensure(dir=1)
 
     def test_locate_engine_class(self):
         cls = _locate_engine_class(FFI(), self.generic)


More information about the pypy-commit mailing list