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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f9a41ed6d1064a4d983754606e3806d822781b69c217e3d81231d606a374132d
MD5 a4d2046003d288213ba8ed16e50b3bc6
BLAKE2b-256 3ea5f0fd1b59523726ae96491e8ce95b28ff10b03cbcc94ed76b010b22f1d989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hatch_bazel_and_pybind11-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4ce1a161886223c080c8df4cf87737dce79fa5d5cb0eb7ca0df7560e44f131f6
MD5 e7614a0ebac43f41e3ff1e5dafa5f842
BLAKE2b-256 59b30e479f322ebd63daaca1830d5cdcfed05c5e41b4daf7186b5aab72a8874a

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