@@ -17,9 +17,7 @@ platform as well as on Windows 32 and 64. (It relies occasionally on
1717libffi, so it depends on libffi being bug-free; this may not be fully
1818the case on some of the more exotic platforms.)
1919
20- CFFI supports CPython 2.7, 3.x (tested with 3.6 to 3.9); and is
21- distributed with PyPy (CFFI 1.0 is distributed with and requires
22- PyPy 2.6).
20+ CFFI is tested with CPython 3.8-3.12.
2321
2422The core speed of CFFI is better than ctypes, with import times being
2523either lower if you use the post-1.0 features, or much higher if you
@@ -31,7 +29,7 @@ libraries on PyPy.
3129
3230Requirements:
3331
34- * CPython 2.7 or 3.x , or PyPy (PyPy 2.0 for the earliest
32+ * CPython 3.8+ , or PyPy (PyPy 2.0 for the earliest
3533 versions of CFFI; or PyPy 2.6 for CFFI 1.0).
3634
3735* in some cases you need to be able to compile C extension modules.
@@ -52,26 +50,14 @@ Download and Installation:
5250
5351* https://pypi.python.org/pypi/cffi
5452
55- * Checksums of the "source" package version 1.15.1:
56-
57- - MD5: f493860a6e98cd0c4178149568a6b4f6
58-
59- - SHA1: c42a46cd11f6153f299cf10e9c236e8b2a143c21
60-
61- - SHA256: d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9
62-
63- * Or grab the most current version from the `Heptapod page `_:
64- ``hg clone https://foss.heptapod.net/pypy/cffi ``
65-
66- * ``python setup.py install `` or ``python setup_base.py install ``
67- (should work out of the box on Linux or Windows; see below for
68- `MacOS X `_.)
53+ * Or grab the most current version from `GitHub `_:
54+ ``git clone https://github.com/python-cffi/cffi ``
6955
7056* running the tests: ``pytest c/ testing/ `` (if you didn't
7157 install cffi yet, you need first ``python setup_base.py build_ext -f
7258 -i ``)
7359
74- .. _`Heptapod page ` : https://foss.heptapod.net/pypy /cffi
60+ .. _`GitHub project home ` : https://github.com/python-cffi /cffi
7561
7662Demos:
7763
8268 ultimate reference is given by the tests, notably
8369 `testing/cffi1/test_verify1.py `_ and `testing/cffi0/backend_tests.py `_.
8470
85- .. _`demo` : https://foss.heptapod.net/pypy /cffi/-/tree/branch/default /demo
86- .. _`testing/cffi1/test_verify1.py` : https://foss.heptapod.net/pypy /cffi/-/ blob/branch/default /testing/cffi1/test_verify1.py
87- .. _`testing/cffi0/backend_tests.py` : https://foss.heptapod.net/pypy /cffi/-/ blob/branch/default /testing/cffi0/backend_tests.py
71+ .. _`demo` : https://github.com/python-cffi /cffi/blob/main /demo
72+ .. _`testing/cffi1/test_verify1.py` : https://github.com/python-cffi /cffi/blob/main /testing/cffi1/test_verify1.py
73+ .. _`testing/cffi0/backend_tests.py` : https://github.com/python-cffi /cffi/blob/main /testing/cffi0/backend_tests.py
8874
8975
9076Platform-specific instructions
@@ -148,28 +134,9 @@ problem applies whenever you want to run compile() to build a dll with
148134this specific compiler suite download.
149135``import setuptools `` might help, but YMMV
150136
151- For Python 3.4 and beyond:
152- https://www.visualstudio.com/en-us/downloads/visual-studio-2015-ctp-vs
153-
154-
155- Linux and OS/X: UCS2 versus UCS4
156- ++++++++++++++++++++++++++++++++
157-
158- This is about getting an ImportError about ``_cffi_backend.so `` with a
159- message like ``Symbol not found: _PyUnicodeUCS2_AsASCIIString ``. This
160- error occurs in Python 2 as soon as you mix "ucs2" and "ucs4" builds of
161- Python. It means that you are now running a Python compiled with
162- "ucs4", but the extension module ``_cffi_backend.so `` was compiled by a
163- different Python: one that was running "ucs2". (If the opposite problem
164- occurs, you get an error about ``_PyUnicodeUCS4_AsASCIIString ``
165- instead.)
166-
167- If you are using ``pyenv ``, then see
168- https://github.com/yyuu/pyenv/issues/257.
169-
170137More generally, the solution that should always work is to download the
171138sources of CFFI (instead of a prebuilt binary) and make sure that you
172- build it with the same version of Python than the one that will use it.
139+ build it with the same version of Python that will use it.
173140For example, with virtualenv:
174141
175142* ``virtualenv ~/venv ``
0 commit comments