Skip to main content

Testing the integration of hatch, bazel and pybind11

Project description

Hatch, bazel and pybind11

PyPI - Version PyPI - Python Version


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.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fd209af237af9a0db22caaac5a7b799b43adc6101c6b1a91f661218ab3c7c670
MD5 287a4349b6aca4eeac7a1a5170cb6545
BLAKE2b-256 0fc2bc0baa95eb7bae759e20f815ad8f0d3b4aa8cfa627b89ef458acb252220e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea0877504defc6773f5d3062b7f842facd4b114f4b9b86c5643da65decf3381
MD5 f243908d502f7807e38da02f2613ed24
BLAKE2b-256 bbd9ac8264e5b104e276bc5d95f6015c9a204c56d9cda1434b961ab4b3fa6ad3

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