Name | autopxd2 JSON |
Version |
2.5.0
JSON |
| download |
home_page | None |
Summary | Automatically generate Cython pxd files from C headers |
upload_time | 2024-12-01 07:30:49 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT License Copyright (c) 2022 Elijah Shaw-Rutschman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
autopxd
autopxd2
cython
code-generators
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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.10
- Python 3.11
- Python 3.12
- Python 3.13
[![Test](https://github.com/elijahr/python-autopxd2/actions/workflows/test.yml/badge.svg)](https://github.com/elijahr/python-autopxd2/actions/workflows/test.yml)
[![Lint](https://github.com/elijahr/python-autopxd2/actions/workflows/lint.yml/badge.svg)](https://github.com/elijahr/python-autopxd2/actions/workflows/lint.yml)
### Installation:
```shell
pip install autopxd2
```
### Usage:
```shell
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.
```
### Contributing:
Contributions are welcome! Please ensure that your code includes unit tests. To install the package in development mode and run tests, use the following commands:
```shell
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest
```
Additionally, we use pre-commit to ensure code quality. To install pre-commit and run it, use the following commands:
```shell
pip install pre-commit
pre-commit install
pre-commit run --all-files
```
### Release History:
#### v2.5.0 - 2024-12-01
- Greatly improve time taken by `vswhere.exe` to find `cl.exe` on Windows [#55](https://github.com/elijahr/python-autopxd2/pull/55)
- Refactor installation to use only pyproject.toml. [#53](https://github.com/elijahr/python-autopxd2/pull/53)
- Update linting to use pre-commit [#53](https://github.com/elijahr/python-autopxd2/pull/53)
- Add contribution guidelines [#53](https://github.com/elijahr/python-autopxd2/pull/53)
- Improve handling of non-literal-as-value in enum parsing [#52](https://github.com/elijahr/python-autopxd2/pull/52)
- Fix parsing crash when using binary operation in enum [#51](https://github.com/elijahr/python-autopxd2/pull/51)
- Fix use configuration of `vswhere.exe` to find `cl.exe` on Windows [#49](https://github.com/elijahr/python-autopxd2/pull/49)
#### v2.4.0 - 2024-09-10
- Add: Support for Python 3.12 from Michael Milton [#45](https://github.com/elijahr/python-autopxd2/pull/45)
- Add: Support for char and binary expression in enum from Poiuzy & Emmanuel Leblond [#47](https://github.com/elijahr/python-autopxd2/pull/47)
- Release now also provide a Wheel on Pypi from Emmanuel Leblond #[#46](https://github.com/elijahr/python-autopxd2/pull/46)
#### v2.3.0 - 2023-01-08
- Add: Support for const & volatile qualifiers from Emmanuel Leblond [#42](https://github.com/elijahr/python-autopxd2/pull/42)
#### v2.2.3 - 2022-10-04
- Move to https://github.com/elijahr/python-autopxd2
#### v2.2.0 - 2022-08-03
- Add: Microsoft Visual C++ support from Steve Dower [#40](https://github.com/elijahr/python-autopxd2/pull/40)
#### v2.1.1 - 2022-05-24
- Add: `--regex` for arbitrary conversions
- Fix: Various other fixes and improvements from Mads Ynddal in [#38](https://github.com/elijahr/python-autopxd2/pull/38)
#### v2.0.4 - 2021-11-23
- Fix: Windows CRLF issue ([#24](https://github.com/elijahr/python-autopxd2/pull/24))
#### v2.0.3 - 2021-10-08
- Fix: remove unnecessary `importlib_resources` from `install_requires`
#### v2.0.2 - 2021-10-07
- Migrate to [`setup.cfg`](https://docs.python.org/3/distutils/configfile.html)
#### 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.
### Stub Headers:
To prevent generating Cython code for `#include <foo>` system headers, python-autopxd2 uses stubbed headers. These are installed with the package and are located in the `autopxd/stubs` directory.
To regenerate the stub headers, use the `regenerate_stubs.py` script. This script downloads the necessary libc stub headers and optionally generates macOS stub headers. This is rarely necessary: only when libc or macOS introduce new header files. Submit a pull request with the updated files.
Raw data
{
"_id": null,
"home_page": null,
"name": "autopxd2",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "autopxd, autopxd2, cython, code-generators",
"author": null,
"author_email": "elijahr <elijahr+autopxd2@gmail.com>, Emmanuel Leblond <emmanuel.leblond@gmail.com>, Gabriel de Marmiesse <gabrieldemarmiesse@gmail.com>, Thiago de Arruda <tpadilha84@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/39/48/720f30544858ca052e27621a7210a4f5acc901d75656467376b30cd816a8/autopxd2-2.5.0.tar.gz",
"platform": null,
"description": "# python-autopxd2\n\nA friendly fork of autopxd https://github.com/tarruda/python-autopxd\n\nIt generates `.pxd` files automatically from `.h` files.\n\n#### Tested against:\n\n- Python 3.10\n- Python 3.11\n- Python 3.12\n- Python 3.13\n\n[![Test](https://github.com/elijahr/python-autopxd2/actions/workflows/test.yml/badge.svg)](https://github.com/elijahr/python-autopxd2/actions/workflows/test.yml)\n[![Lint](https://github.com/elijahr/python-autopxd2/actions/workflows/lint.yml/badge.svg)](https://github.com/elijahr/python-autopxd2/actions/workflows/lint.yml)\n\n### Installation:\n\n```shell\npip install autopxd2\n```\n\n### Usage:\n\n```shell\nUsage: autopxd [OPTIONS] [INFILE] [OUTFILE]\n\n Generate a Cython pxd file from a C header file.\n\nOptions:\n -v, --version Print program version and exit.\n -I, --include-dir <dir> Allow the C preprocessor to search for files\n in <dir>.\n\n -D, --compiler-directive <directive>\n Additional directives for the C compiler.\n --debug / --no-debug Dump preprocessor output to stderr.\n -h, --help Show this message and exit.\n```\n\n### Contributing:\n\nContributions are welcome! Please ensure that your code includes unit tests. To install the package in development mode and run tests, use the following commands:\n\n```shell\npython -m venv .venv\nsource .venv/bin/activate\npip install -e '.[dev]'\npytest\n```\n\nAdditionally, we use pre-commit to ensure code quality. To install pre-commit and run it, use the following commands:\n\n```shell\npip install pre-commit\npre-commit install\npre-commit run --all-files\n```\n\n### Release History:\n\n#### v2.5.0 - 2024-12-01\n\n- Greatly improve time taken by `vswhere.exe` to find `cl.exe` on Windows [#55](https://github.com/elijahr/python-autopxd2/pull/55)\n- Refactor installation to use only pyproject.toml. [#53](https://github.com/elijahr/python-autopxd2/pull/53)\n- Update linting to use pre-commit [#53](https://github.com/elijahr/python-autopxd2/pull/53)\n- Add contribution guidelines [#53](https://github.com/elijahr/python-autopxd2/pull/53)\n- Improve handling of non-literal-as-value in enum parsing [#52](https://github.com/elijahr/python-autopxd2/pull/52)\n- Fix parsing crash when using binary operation in enum [#51](https://github.com/elijahr/python-autopxd2/pull/51)\n- Fix use configuration of `vswhere.exe` to find `cl.exe` on Windows [#49](https://github.com/elijahr/python-autopxd2/pull/49)\n\n#### v2.4.0 - 2024-09-10\n\n- Add: Support for Python 3.12 from Michael Milton [#45](https://github.com/elijahr/python-autopxd2/pull/45)\n- Add: Support for char and binary expression in enum from Poiuzy & Emmanuel Leblond [#47](https://github.com/elijahr/python-autopxd2/pull/47)\n- Release now also provide a Wheel on Pypi from Emmanuel Leblond #[#46](https://github.com/elijahr/python-autopxd2/pull/46)\n\n#### v2.3.0 - 2023-01-08\n\n- Add: Support for const & volatile qualifiers from Emmanuel Leblond [#42](https://github.com/elijahr/python-autopxd2/pull/42)\n\n#### v2.2.3 - 2022-10-04\n\n- Move to https://github.com/elijahr/python-autopxd2\n\n#### v2.2.0 - 2022-08-03\n\n- Add: Microsoft Visual C++ support from Steve Dower [#40](https://github.com/elijahr/python-autopxd2/pull/40)\n\n#### v2.1.1 - 2022-05-24\n\n- Add: `--regex` for arbitrary conversions\n- Fix: Various other fixes and improvements from Mads Ynddal in [#38](https://github.com/elijahr/python-autopxd2/pull/38)\n\n#### v2.0.4 - 2021-11-23\n\n- Fix: Windows CRLF issue ([#24](https://github.com/elijahr/python-autopxd2/pull/24))\n\n#### v2.0.3 - 2021-10-08\n\n- Fix: remove unnecessary `importlib_resources` from `install_requires`\n\n#### v2.0.2 - 2021-10-07\n\n- Migrate to [`setup.cfg`](https://docs.python.org/3/distutils/configfile.html)\n\n#### v2.0.1 - 2021-10-06\n\n- Add: `--compiler-directive` option to pass along to the compiler\n- Add: some type annotations (`nodes.py`)\n- Deprecation: Drop support for Python 2\n- Add: linting, format with black\n- Add: Migrate from Travis CI to Github Actions\n\n#### v1.1.0 - 2020-01-03\n\n- Add: Support for macOS\n\n### Roadmap:\n\n- Refactoring of the code **DONE**\n- Adding tests for PEP8 **DONE**\n- Uploading to PyPi **DONE**\n- Check that the generated code is correct by comparing it to the libc in Cython\n- More tests\n- Merge it into Cython so that the `.pxd` files aren't necessary anymore? Maybe.\n\n#### Please raise an issue if the generated code isn't correct.\n\nIt's difficult to catch all the corner cases.\n\n### Stub Headers:\n\nTo prevent generating Cython code for `#include <foo>` system headers, python-autopxd2 uses stubbed headers. These are installed with the package and are located in the `autopxd/stubs` directory.\n\nTo regenerate the stub headers, use the `regenerate_stubs.py` script. This script downloads the necessary libc stub headers and optionally generates macOS stub headers. This is rarely necessary: only when libc or macOS introduce new header files. Submit a pull request with the updated files.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 Elijah Shaw-Rutschman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Automatically generate Cython pxd files from C headers",
"version": "2.5.0",
"project_urls": {
"Homepage": "https://github.com/elijahr/python-autopxd2"
},
"split_keywords": [
"autopxd",
" autopxd2",
" cython",
" code-generators"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4952b0fda0c08eb7fbf6b4b7a49ffac266233ffaa05c4f70c9664ad26e8cbdeb",
"md5": "aee8e40d840e5db2b3708c956371ae8b",
"sha256": "1102dcaeebdb355dd3eb3b953776e291e165d3d38974047233a69b7cb42cea8c"
},
"downloads": -1,
"filename": "autopxd2-2.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aee8e40d840e5db2b3708c956371ae8b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 665779,
"upload_time": "2024-12-01T07:30:39",
"upload_time_iso_8601": "2024-12-01T07:30:39.157803Z",
"url": "https://files.pythonhosted.org/packages/49/52/b0fda0c08eb7fbf6b4b7a49ffac266233ffaa05c4f70c9664ad26e8cbdeb/autopxd2-2.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3948720f30544858ca052e27621a7210a4f5acc901d75656467376b30cd816a8",
"md5": "7076de17d54d59260d42ff4429af5c70",
"sha256": "bb1556cf62d25d6a4362f405af196b9b10355d06a0c874df15fe2185a1ca3aa7"
},
"downloads": -1,
"filename": "autopxd2-2.5.0.tar.gz",
"has_sig": false,
"md5_digest": "7076de17d54d59260d42ff4429af5c70",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 109511,
"upload_time": "2024-12-01T07:30:49",
"upload_time_iso_8601": "2024-12-01T07:30:49.080487Z",
"url": "https://files.pythonhosted.org/packages/39/48/720f30544858ca052e27621a7210a4f5acc901d75656467376b30cd816a8/autopxd2-2.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-01 07:30:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "elijahr",
"github_project": "python-autopxd2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "autopxd2"
}