Testing the integration of hatch, bazel and pybind11
Project description
Hatch, bazel and pybind11
This example project shows how to integrate hatch, bazel and pybind11, or in other words how to build a C++ Python extension module based pybind11 via bazel and make it part of a python package managed by hatch.
This is done very much in the spirit of Cunningham's Law:
the best way to get the right answer on the internet is not to ask a question; it's to post the wrong answer
Playing with this code
hatch build
always runs bazel and therefore always refreshes the
extension module as needed, but hatch test
or hatch shell
do not
know they have to run bazel, so hatch build && hatch test
or similar
is the robust way to rebuild the native code as needed, at least for now:
without an explicit hatch build
, hatch test/shell
risk running with
stale versions of the extension module.
Installation
pip install hatch-bazel-and-pybind11
License
hatch-bazel-and-pybind11
is distributed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hatch_bazel_and_pybind11-0.0.4.tar.gz
.
File metadata
- Download URL: hatch_bazel_and_pybind11-0.0.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a41ed6d1064a4d983754606e3806d822781b69c217e3d81231d606a374132d |
|
MD5 | a4d2046003d288213ba8ed16e50b3bc6 |
|
BLAKE2b-256 | 3ea5f0fd1b59523726ae96491e8ce95b28ff10b03cbcc94ed76b010b22f1d989 |
File details
Details for the file hatch_bazel_and_pybind11-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: hatch_bazel_and_pybind11-0.0.4-py3-none-any.whl
- Upload date:
- Size: 181.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ce1a161886223c080c8df4cf87737dce79fa5d5cb0eb7ca0df7560e44f131f6 |
|
MD5 | e7614a0ebac43f41e3ff1e5dafa5f842 |
|
BLAKE2b-256 | 59b30e479f322ebd63daaca1830d5cdcfed05c5e41b4daf7186b5aab72a8874a |