Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Publish Wheels (Multi Arch)

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [created] # This triggers the job when a new GitHub release is created.

jobs:
build:
name: Build Wheels (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04, macos-15, windows-2025]
arch: [x86_64]
include:
- os: ubuntu-24.04-arm
arch: aarch64
- os: ubuntu-22.04-arm
arch: aarch64
- os: macos-15
arch: arm64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel twine
- name: Build wheels
run: pip wheel . -w dist
- name: Upload wheels artifact
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.arch }}
path: dist/*

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: build # Ensure this job only runs if the build completes successfully.
if: github.event_name == 'release' # Only publish when a release is created.
steps:
- uses: actions/checkout@v4
- name: Download all built wheels
uses: actions/download-artifact@v4
with:
path: dist
- name: Publish package to PyPI
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m pip install --upgrade twine
python -m twine upload dist/** --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# pyproject.toml
[build-system]
requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pyplusplus"
version = "1.8.7"
authors = [
{name = "Roman Yakovenko", email = "roman.yakovenko@gmail.com"},
]
maintainers = [
{name = "Mark Moll", email = "mark.moll@gmail.com"},
]
description = "Py++ is a framework of components for creating a C++ code generator using the Boost.Python library"
readme = "README.txt"
license = {file = "LICENSE_1_0.txt"}
requires-python = ">=2.7"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python",
"Topic :: Software Development"
]
dependencies = [
"pygccxml"
]

[tool.setuptools]
packages = [
"pyplusplus",
"pyplusplus.file_writers",
"pyplusplus.code_creators",
"pyplusplus.creators_factory",
"pyplusplus.code_repository",
"pyplusplus.code_repository.indexing_suite",
"pyplusplus.decl_wrappers",
"pyplusplus.module_builder",
"pyplusplus.utils",
"pyplusplus.function_transformers",
"pyplusplus._logging_",
"pyplusplus.messages",
"pyplusplus.binary_parsers"
]

[tool.cibuildwheel]
archs = ["auto64"]
build-verbosity = 1

manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"