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 .

Metadata

Release files for hello-ext-demo 1.0.1

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

Source distribution (sdist)

Source distribution for hello-ext-demo 1.0.1
File Size Uploaded
hello_ext_demo-1.0.1.tar.gz 2.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for hello-ext-demo 1.0.1
File
hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-32 Details
hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details

Total release size: 1.9 MB

Release files / hello_ext_demo-1.0.1.tar.gz

Download URL hello_ext_demo-1.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6dd9da5c479fbd7a93c04e18ea7e13a29531255c2e9ac9c72e47594b7b246c6f
BLAKE2b-256 checksum
How to use checksums
d0cff64e053c04bddbe7b5dee2e2ed4df750d3cbd752f009e9a56ee2381f175e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 885.6 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
87ebd415bffb7a32d8987dcfab0b3d4042eb3bcbdd8843c15f0e241e5d3000ea
BLAKE2b-256 checksum
How to use checksums
75211a07c0f6f9839b217aae205f63476c55b986a26a057d4c40ea7c3f587c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL hello_ext_demo-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Size 875.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-32
SHA-256 checksum
How to use checksums
7acd120c67f4d20291e60e88adb1fac782b42823802df17b304b6dafe488fbad
BLAKE2b-256 checksum
How to use checksums
a790150b56f8da5cfc09e00b5a1afa909487a2b9d7fa918fcc8ae98c9f63970b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl

Download URL hello_ext_demo-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
Size 62.0 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
876edf22a3cb6bf03127717001caeddaaa281d2882554ea933c8253a79a8ae8e
BLAKE2b-256 checksum
How to use checksums
05c3f27f024dc4cfcfedadad3e8b9a9d811147d56ddc823f4af13365461c702e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl

Download URL hello_ext_demo-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Size 64.1 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
4bb9406775897339821a9ea8993f706c46427f7f9c610535ff2e33b7fee46e99
BLAKE2b-256 checksum
How to use checksums
88cafb27b13d028154bb154aae30ef1cde9a14523c7e9dc24363fdbb436b72ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

5 release files

1.0.0

5 release files

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