跳转到主要内容

自动从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

Test Lint

安装

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

版本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 查看哈希)

上传时间 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面