Skip to main content

Testing the integration of hatch, bazel and pybind11

Project description

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.

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

hatch_bazel_and_pybind11-0.0.5.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl (181.0 kB view details)

Uploaded Python 3

File details

Details for the file hatch_bazel_and_pybind11-0.0.5.tar.gz.

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.5.tar.gz
Algorithm Hash digest
SHA256 06fac33e0c93f0f8934b7cc300f217997e27f59162a38cbb930d506a2a827bfc
MD5 e7631cdd30dbd9cf958be95edb2b9a96
BLAKE2b-256 549768e495dcfe4d1650bf1de6d520676eebaa73460a4adc705b411cbe653cd1

See more details on using hashes here.

File details

Details for the file hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a516a7ca2d7b16ebaf098c4d90a32a352e00d6188815a751cb4206f503988af4
MD5 0d3de5669a6943739a2f8c87fafa03d1
BLAKE2b-256 933011060616d0c1812d616ecd659801aa0137d31d2a6ebdcc2c4b428ebe02f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page