@@ -8,48 +8,12 @@ Python C API compatibility
88
99The ``pythoncapi-compat `` project can be used to write a C or C++ extension
1010supporting a wide range of Python versions with a single code base. It is made
11- of the ``pythoncapi_compat.h `` header file and the ``upgrade_pythoncapi.py ``
12- script.
13-
14- ``upgrade_pythoncapi.py `` requires Python 3.6 or newer.
11+ of the ``pythoncapi_compat.h `` header file.
1512
1613See the `documentation at ReadTheDocs
1714<https://pythoncapi-compat.readthedocs.io/en/latest/> `_
1815for more details.
1916
20- Getting started
21- ===============
22-
23- To upgrade a specific file::
24-
25- python3 upgrade_pythoncapi.py module.c
26-
27- To upgrade all C/C++ files in a directory::
28-
29- python3 upgrade_pythoncapi.py src/
30-
31- Select operations
32- -----------------
33-
34- To only replace ``op->ob_type `` with ``Py_TYPE(op) ``, select the ``Py_TYPE ``
35- operation with::
36-
37- python3 upgrade_pythoncapi.py -o Py_TYPE module.c
38-
39- Or the opposite, to apply all operations but leave ``op->ob_type `` unchanged,
40- deselect the ``Py_TYPE `` operation with::
41-
42- python3 upgrade_pythoncapi.py -o all,-Py_TYPE module.c
43-
44- Download pythoncapi_compat.h
45- ----------------------------
46-
47- If you want to ``pythoncapi_compat.h `` to your code base, use the
48- ``upgrade_pythoncapi.py `` tool to fetch it::
49-
50- python3 upgrade_pythoncapi.py --download PATH
51-
52-
5317This project is distributed under the `Zero Clause BSD (0BSD) license
5418<https://opensource.org/licenses/0BSD> `_ and is covered by the `PSF Code of
5519Conduct <https://www.python.org/psf/codeofconduct/> `_.
0 commit comments