Minimal pybind11 extension demo package
Project description
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 .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hello_ext_demo-1.0.0.tar.gz.
File metadata
- Download URL: hello_ext_demo-1.0.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a684515c6e8eb542c37d961679d0d760bfd08a04e04b668517de4ae229f5d0e
|
|
| MD5 |
1b8fbd7225f9df8d309d190409a40d59
|
|
| BLAKE2b-256 |
7e15ea81441c13c8f1e5563b0054f3fb72b20e144ed6ff9e3060d5bf339f5f74
|
File details
Details for the file hello_ext_demo-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hello_ext_demo-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 885.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cc9d4ce987d957aad1a3a56c053eb240d20e80d3463ecc539f1cfc1f5783d64
|
|
| MD5 |
c4a6d1b61e76d812f49510febbd38596
|
|
| BLAKE2b-256 |
8e02df8e2cc7a04ab67db3e5eeb31ccbfd6fddd1516ea31a38980520cdd0a2e9
|
File details
Details for the file hello_ext_demo-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hello_ext_demo-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 875.0 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62f4b0ade95a940a247c0ec79c6165fcafa009e9853293eb021a919c1d556009
|
|
| MD5 |
a7e5545895ab08ca9f2496e0b25044c9
|
|
| BLAKE2b-256 |
085451ee798d2a7739c92ad2decf5539554ba783cf1dd23aadc39c3f3b16d7c2
|
File details
Details for the file hello_ext_demo-1.0.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: hello_ext_demo-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 62.0 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942d67a94fae7a311010655274ca200fbdb89195febd546d9b2c734e9b89dc60
|
|
| MD5 |
87e1e58430abd34788458174f9cfe312
|
|
| BLAKE2b-256 |
6c2d4a1aaaf5376eb49de3b125ef9c72069a19c78ea21d641d2de43a9cc3af50
|
File details
Details for the file hello_ext_demo-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: hello_ext_demo-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 64.1 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d414291def5a00eafe1e1c37443c189d61f101a3904ceb334634fc266389ebaf
|
|
| MD5 |
1009acc3fb520e27aa4598c2cd0ca923
|
|
| BLAKE2b-256 |
3ce5349f7b30cfd86931ac2e13165ba0df30981ba1b4b7ff3c88d87ec0dcbc6f
|