Skip to main content

Automatically generate Cython pxd files from C headers

Project description

python-autopxd2

A friendly fork of autopxd https://github.com/tarruda/python-autopxd

It generates .pxd files automatically from .h files.

Tested against:

  • Python 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10

Test Lint

installation:

pip install autopxd2

Usage:

Usage: autopxd [OPTIONS] [INFILE] [OUTFILE]

  Generate a Cython pxd file from a C header file.

Options:
  -v, --version                   Print program version and exit.
  -I, --include-dir <dir>         Allow the C preprocessor to search for files
                                  in <dir>.

  -D, --compiler-directive <directive>
                                  Additional directives for the C compiler.
  --debug / --no-debug            Dump preprocessor output to stderr.
  -h, --help                      Show this message and exit.

Release History:

v2.2.0 - 2022-08-03

  • Add: Microsoft Visual C++ support from Steve Dower #40

v2.1.1 - 2022-05-24

  • Add: --regex for arbitrary conversions
  • Fix: Various other fixes and improvements from Mads Ynddal in #38

v2.0.4 - 2021-11-23

  • Fix: Windows CRLF issue (#24)

v2.0.3 - 2021-10-08

  • Fix: remove unnecessary importlib_resources from install_requires

v2.0.2 - 2021-10-07

v2.0.1 - 2021-10-06

  • Add: --compiler-directive option to pass along to the compiler
  • Add: some type annotations (nodes.py)
  • Deprecation: Drop support for Python 2
  • Add: linting, format with black
  • Add: Migrate from Travis CI to Github Actions

v1.1.0 - 2020-01-03

  • Add: Support for macOS

Roadmap:

  • Refactoring of the code DONE
  • Adding tests for PEP8 DONE
  • Uploading to PyPi DONE
  • Check that the generated code is correct by comparing it to the libc in Cython
  • More tests
  • Merge it into Cython so that the .pxd files aren't necessary anymore? Maybe.

Please raise an issue if the generated code isn't correct.

It's difficult to catch all the corner cases.

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

autopxd2-2.2.2.tar.gz (82.6 kB view details)

Uploaded Source

Built Distribution

autopxd2-2.2.2-py3-none-any.whl (446.9 kB view details)

Uploaded Python 3

File details

Details for the file autopxd2-2.2.2.tar.gz.

File metadata

  • Download URL: autopxd2-2.2.2.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.1

File hashes

Hashes for autopxd2-2.2.2.tar.gz
Algorithm Hash digest
SHA256 dbc4cda4436b65231e5aa1979533f4802f84a70ab16f18227aee8c76a954be9a
MD5 04736d421b996d844a0980061e32c5d1
BLAKE2b-256 f9ca251d1764d72453aa966106189419953e028477e303366ed8fa80f0c6ba30

See more details on using hashes here.

File details

Details for the file autopxd2-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: autopxd2-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 446.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.1

File hashes

Hashes for autopxd2-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b9d1afc8b59ea0bf8bb44a0fbfa46c9514eb7811d02053d9f53c29344f04190
MD5 b97f18465f8f0a6b93425a61573ebacf
BLAKE2b-256 94bd080ba90483a716f0f945793b3a6ece28895e8b944b3aea440756611d3b16

See more details on using hashes here.

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