Skip to main content

Hatch, bazel and pybind11

PyPI - Version PyPI - Python Version test


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.

Metadata

Release files for hatch-bazel-and-pybind11 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hatch-bazel-and-pybind11 0.0.5
File Size Uploaded Provenance
hatch_bazel_and_pybind11-0.0.5.tar.gz 7.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hatch-bazel-and-pybind11 0.0.5
File Interpreter ABI Platform
hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 188.9 kB

Release files / hatch_bazel_and_pybind11-0.0.5.tar.gz

Download URL hatch_bazel_and_pybind11-0.0.5.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
06fac33e0c93f0f8934b7cc300f217997e27f59162a38cbb930d506a2a827bfc
BLAKE2b-256 checksum
How to use checksums
549768e495dcfe4d1650bf1de6d520676eebaa73460a4adc705b411cbe653cd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl

Download URL hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl
Size 181.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a516a7ca2d7b16ebaf098c4d90a32a352e00d6188815a751cb4206f503988af4
BLAKE2b-256 checksum
How to use checksums
933011060616d0c1812d616ecd659801aa0137d31d2a6ebdcc2c4b428ebe02f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Security for hatch-bazel-and-pybind11 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page