Skip to main content

pybind11 extension package demo

This folder is a standalone Python package that builds a pybind11 extension:

  • hello_ext._core (C++ extension with pybind11)

The add function is implemented in C (hello_c.c) and mul in C++ (hello_cpp.cpp).

On macOS/Linux you will get .so files; on Windows you will get .pyd files.

Build and install

python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip build
python -m build
python -m pip install dist/*.whl

Try it

python -c "import hello_ext; print(hello_ext.add(2, 3)); print(hello_ext.mul(3, 4))"

Build from source (editable)

python -m pip install -v .

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hello_ext_demo-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (885.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (875.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686

hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl (62.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (64.1 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file hello_ext_demo-1.0.1.tar.gz.

File metadata

  • Download URL: hello_ext_demo-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hello_ext_demo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6dd9da5c479fbd7a93c04e18ea7e13a29531255c2e9ac9c72e47594b7b246c6f
MD5 eab7562d917bf658ed958f600773bb95
BLAKE2b-256 d0cff64e053c04bddbe7b5dee2e2ed4df750d3cbd752f009e9a56ee2381f175e

See more details on using hashes here.

File details

Details for the file hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87ebd415bffb7a32d8987dcfab0b3d4042eb3bcbdd8843c15f0e241e5d3000ea
MD5 ba006796c31bba32d5bf3c048d2098e2
BLAKE2b-256 75211a07c0f6f9839b217aae205f63476c55b986a26a057d4c40ea7c3f587c9b

See more details on using hashes here.

File details

Details for the file hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7acd120c67f4d20291e60e88adb1fac782b42823802df17b304b6dafe488fbad
MD5 e0b0bc46d710760edd2e328d8e20ba17
BLAKE2b-256 a790150b56f8da5cfc09e00b5a1afa909487a2b9d7fa918fcc8ae98c9f63970b

See more details on using hashes here.

File details

Details for the file hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 876edf22a3cb6bf03127717001caeddaaa281d2882554ea933c8253a79a8ae8e
MD5 66f42ef2c8f4159d0c8a6ed7b00bb81e
BLAKE2b-256 05c3f27f024dc4cfcfedadad3e8b9a9d811147d56ddc823f4af13365461c702e

See more details on using hashes here.

File details

Details for the file hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4bb9406775897339821a9ea8993f706c46427f7f9c610535ff2e33b7fee46e99
MD5 42bbbf5444c2c4da157877f0b11e0b11
BLAKE2b-256 88cafb27b13d028154bb154aae30ef1cde9a14523c7e9dc24363fdbb436b72ff

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

5 files

1.0.0

5 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page