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.3.tar.gz
.
File metadata
- Download URL: hatch_bazel_and_pybind11-0.0.3.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff49dcd85697f2e166a4987527e50bb1a1c93437bed666cf475ec2e76b2e7293 |
|
MD5 | 035b6e523ad4af9a5836a080cf51eb30 |
|
BLAKE2b-256 | 37079d45eb88913ef94bd1ed99fcb98e384208ac42cf171829b0c4ba5b544e4b |
File details
Details for the file hatch_bazel_and_pybind11-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: hatch_bazel_and_pybind11-0.0.3-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 | 50ba9b1544d6b80d5f7405f33f1fde3e9a67dd8d865609985a8d900f0d183614 |
|
MD5 | d877fd731821cd2e580d8c93a19b0077 |
|
BLAKE2b-256 | 1c7a12d30f59378cee6cb1119d2157aeb0e88c7fe11a1b7903b39cd8680d8665 |