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.9
- Python 3.10
- Python 3.11
- Python 3.12
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.4.0 - 2024-09-10
- Add: Support for Python 3.12 from Michael Milton #45
- Add: Support for char and binary expression in enum from Poiuzy & Emmanuel Leblond #47
- Release now also provide a Wheel on Pypi from Emmanuel Leblond ##46
v2.3.0 - 2023-01-08
- Add: Support for const & volatile qualifiers from Emmanuel Leblond #42
v2.2.3 - 2022-10-04
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
frominstall_requires
v2.0.2 - 2021-10-07
- Migrate to
setup.cfg
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
Release history Release notifications | RSS feed
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.4.0.tar.gz
(23.1 kB
view details)
Built Distribution
autopxd2-2.4.0-py3-none-any.whl
(38.3 kB
view details)
File details
Details for the file autopxd2-2.4.0.tar.gz
.
File metadata
- Download URL: autopxd2-2.4.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 863370d5d2e62e544f3e1155a03330f05cc846d5331f71f2c45ca9b8cdb84d66 |
|
MD5 | 5da6aff8377892c497b459ef7f5defd0 |
|
BLAKE2b-256 | a17dca6bf9b815ef892fa465676a131058f0544b0db086e5769e567006be36b7 |
File details
Details for the file autopxd2-2.4.0-py3-none-any.whl
.
File metadata
- Download URL: autopxd2-2.4.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5814cd45d149fa6f1c5cc830fdb30b0ada5fef2eb9b56c3fbf3731e5fc9fa40 |
|
MD5 | cf03139f82409f17403c6edccd395169 |
|
BLAKE2b-256 | 0668da10587951c848f938b208fc9425bbf3d5ce9de5412bed94accdb022ac03 |