Skip to main content

MyLib (pybind11 Version)

A cross-platform C++ library with a Python interface using pybind11.

Features

  • C++ core logic
  • Pythonic interface via pybind11
  • Builds on Windows, Linux, and macOS
  • Packaged using scikit-build-core
  • Visual Studio 2022 solution generation via CMake
  • Includes C++ and Python tests

🛠 Build & Install Locally (Python)

Step 1: Install Build Requirements

pip install scikit-build-core pybind11[global] build

Step 2: Install the Package

pip install .

Or build a wheel:

python -m build

🧪 Python Usage

from mylib import MyLib

lib = MyLib()
lib.do_work()
print(lib.get_counter())
lib.reset_counter()

To run tests:

python tests/test_python.py

🧰 C++ Development & Testing (Visual Studio 2022)

Step 1: Open Visual Studio 2022 Developer Command Prompt

Launch "x64 Native Tools Command Prompt for VS 2022"

Step 2: Create Build Directory and Generate Solution

cd mylib
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64

This generates MyLib.sln which you can open with Visual Studio.

Step 3: Build in Release Mode

cmake --build . --config Release

Step 4: Run the C++ Test

./Release/test_mylib.exe

🚀 Publish to PyPI

Step 1: Create an Account

Step 2: Install Twine

pip install twine

Step 3: Build the Package

python -m build

Step 4: Upload to PyPI

twine upload dist/*

Use __token__ as your username and paste the token when prompted.


🧱 Project Layout

mylib/
├── CMakeLists.txt
├── pyproject.toml
├── README.md
├── src/
│   ├── CMakeLists.txt
│   ├── mylib.cpp
│   └── test.cpp
├── tests/
│   └── test_python.py

Metadata

Release files for acube3-mylib 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for acube3-mylib 0.1.0
File Interpreter ABI Platform Actions
acube3_mylib-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for acube3_mylib-0.1.0-cp310-cp310-win_amd64.whl

Release files / acube3_mylib-0.1.0-cp310-cp310-win_amd64.whl

Download URL acube3_mylib-0.1.0-cp310-cp310-win_amd64.whl
Size 2.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
bd02a39d52da301b28ce37d6a4aa31dadd4d962900dd95ea21123ce0f0992795
BLAKE2b-256 checksum
How to use checksums
6e83c5d2055e08112b72a5b95ec772af92ee477d02fecc68bc6242a52939cb82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Security for acube3-mylib 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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