自动从C头文件生成Cython pxd文件
项目描述
python-autopxd2
autopxd的友好分支 https://github.com/tarruda/python-autopxd
它可以从.h文件自动生成.pxd
文件。
测试平台
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
安装
pip install autopxd2
使用方法
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.
发布历史
v2.4.0 - 2024-09-10
- 新增:支持Python 3.12(来自Michael Milton) #45
- 新增:支持枚举中的char和二进制表达式(来自Poiuzy & Emmanuel Leblond) #47
- 发布现在也提供Pypi上的Wheel(来自Emmanuel Leblond) ##46
v2.3.0 - 2023-01-08
- 新增:支持const & volatile限定符(来自Emmanuel Leblond) #42
v2.2.3 - 2022-10-04
v2.2.0 - 2022-08-03
- 新增:支持Microsoft Visual C++(来自Steve Dower) #40
版本2.1.1 - 2022-05-24
- 新增:支持使用
--regex
进行任意转换 - 修复:Mads Ynddal在#38中提供的各种其他修复和改进
版本2.0.4 - 2021-11-23
- 修复:解决Windows的CRLF问题 (#24)
版本2.0.3 - 2021-10-08
- 修复:从
install_requires
中移除不必要的importlib_resources
版本2.0.2 - 2021-10-07
- 迁移到
setup.cfg
版本2.0.1 - 2021-10-06
- 新增:添加
--compiler-directive
选项以传递给编译器 - 新增:在
nodes.py
中添加一些类型注解 - 弃用:放弃对Python 2的支持
- 新增:进行代码风格检查,使用black格式化
- 新增:从Travis CI迁移到GitHub Actions
版本1.1.0 - 2020-01-03
- 新增:支持macOS
路线图
- 代码重构 完成
- 为PEP8添加测试 完成
- 上传到PyPi 完成
- 通过将生成的代码与Cython中的libc进行比较来检查生成的代码是否正确
- 更多测试
- 将其合并到Cython中,这样
.pxd
文件就不再需要了?也许吧。
如果生成的代码不正确,请提出问题。
很难捕捉到所有角落的情况。
项目详情
下载文件
下载适合您平台的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。
源分布
autopxd2-2.4.0.tar.gz (23.1 kB 查看哈希)
构建分布
autopxd2-2.4.0-py3-none-any.whl (38.3 kB 查看哈希)
关闭
autopxd2-2.4.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 863370d5d2e62e544f3e1155a03330f05cc846d5331f71f2c45ca9b8cdb84d66 |
|
MD5 | 5da6aff8377892c497b459ef7f5defd0 |
|
BLAKE2b-256 | a17dca6bf9b815ef892fa465676a131058f0544b0db086e5769e567006be36b7 |
关闭
autopxd2-2.4.0-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d5814cd45d149fa6f1c5cc830fdb30b0ada5fef2eb9b56c3fbf3731e5fc9fa40 |
|
MD5 | cf03139f82409f17403c6edccd395169 |
|
BLAKE2b-256 | 0668da10587951c848f938b208fc9425bbf3d5ce9de5412bed94accdb022ac03 |