Skip to main content

Python compatibility headers

Project description

py3c helps you port C extensions to Python 3.

It provides a detailed guide, and a set of macros to make porting easy and reduce boilerplate.

Design principles

  • Reduce chances of accidental subtle errors

  • Minimize boilerplate

  • Prefer the Python 3 way of doing things

  • Minimize semantic changes under Python 2

Versions

Projects using py3c will be compatible with CPython 2.6, 2.7, and 3.3+.

Guides

A detailed porting guide is provided.

A cheatsheet is available for those that already know the Python C API, and want to know what the py3c macros do.

Installation

If your build system supports pkg-config, you can set it up to look for a system-wide installation of py3c.

Alternately, py3c can be used as a header-only library: copy the headers to your project and use them.

If you wish to install py3c system-wide (e.g. if you are a distro packager), see the Contributing chapter in the documentation.

Contribute

License

The code is licensed under the MIT license. May it serve you well.

The documentation is licensed under CC-BY-SA 3.0.

See the files LICENSE.MIT and doc/LICENSE.CC-BY-SA-3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py3c-1.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

py3c-1.2-py2.py3-none-any.whl (9.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file py3c-1.2.tar.gz.

File metadata

  • Download URL: py3c-1.2.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

File hashes

Hashes for py3c-1.2.tar.gz
Algorithm Hash digest
SHA256 3baedd9cfb0b13a0f159d5ba9d76cfaaf845e57014980c6a149d78783b2ff37e
MD5 c08422f2350cd4dc299af8ee275ba65f
BLAKE2b-256 50d2053c45a32bb0dd31717d8f6b2ad1464a7b27489d8478bb2b1eb4748088f6

See more details on using hashes here.

Provenance

File details

Details for the file py3c-1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: py3c-1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

File hashes

Hashes for py3c-1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2cdc341f920dd2bb15ce179e663253963cdfe1cbab0213e40f2f095882eca70c
MD5 b3c6276d69c04c20001fa591170d48f6
BLAKE2b-256 5812ec5683d8f944fa41b9a20e839abfb374bac4c320ea6aea8398ee994abe17

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page