https://github.com/robotpy/hatch-nativelib
Hatchling plugin with utilities for native libraries
https://github.com/robotpy/hatch-nativelib
Last synced: 3 months ago
JSON representation
Hatchling plugin with utilities for native libraries
- Host: GitHub
- URL: https://github.com/robotpy/hatch-nativelib
- Owner: robotpy
- Created: 2025-04-25T04:04:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-18T02:09:17.000Z (about 1 year ago)
- Last Synced: 2025-09-25T11:35:45.520Z (9 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
hatch-nativelib
===============
Hatchling plugin with utilities for native libraries.
pkgconf dependency generation
-----------------------------
By adding `[[tool.hatch.build.hooks.nativelib.pcfile]]` to your hatchling project's
`pyproject.toml`, this plugin will do a couple of things:
* Automatically generate the .pc file from the `pyproject.toml` config section
* Register the .pc file so that [pkgconf-pypi](https://github.com/pypackaging-native/pkgconf-pypi)
will find it and things such as meson can use it for dependency resolution
- Also sets `PKG_CONFIG_PATH` so that other hatchling plugins can resolve it
* Generates a python module that uses ctypes to load the library when imported. The
library can be found via pkgconf, in the variable `pkgconf_pypi_initpy`
See [config](src/hatch_nativelib/config.py) for `pyproject.toml` configuration.