Skip to content

Commit

Permalink
Version 0.3.0a3
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Nov 24, 2024
1 parent c8e6104 commit 80350a3
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies = ["numpy"]
dynamic = ["version", "description"]

[build-system] # How pip and other frontends should build this project
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module] # Where to find the Python module to package
Expand Down
78 changes: 39 additions & 39 deletions docs/Cross-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Let's go over these requirements step by step:
We'll first clone `py-build-cmake` and its example projects:

```sh
git clone https://github.com/tttapa/py-build-cmake --branch=0.3.0a2
git clone https://github.com/tttapa/py-build-cmake --branch=0.3.0a3
cd py-build-cmake
```

Expand Down Expand Up @@ -209,15 +209,15 @@ If everything worked as expected, you should see output similar to the following
[100%] Built target _add_module
-- Installing: /tmp/xxxxx/staging/pybind11_project/_add_module.cpython-311-aarch64-linux-gnu.so
[...]
Successfully built pybind11_project-0.3.0a2-cp311-cp311-manylinux_2_27_aarch64.whl
Successfully built pybind11_project-0.3.0a3-cp311-cp311-manylinux_2_27_aarch64.whl
```
You can see that CMake is using the cross-compiler we downloaded, and that it
managed to locate the version of Python we requested (CPython 3.11 for AArch64).
It is important to verify the module extension suffix
(`.cpython-311-aarch64-linux-gnu.so` in this case) and the Wheel tags
(`cp311-cp311-manylinux_2_27_aarch64`).

You can now copy the Wheel package in `examples/pybind11-project/dist/pybind11_project-0.3.0a2-cp311-cp311-manylinux_2_27_aarch64.whl`
You can now copy the Wheel package in `examples/pybind11-project/dist/pybind11_project-0.3.0a3-cp311-cp311-manylinux_2_27_aarch64.whl`
to e.g. a Raspberry Pi and install it using `pip install`.

### Automated Bash scripts
Expand All @@ -237,42 +237,42 @@ You can find the resulting Wheel packages in the
`examples/pybind11-project/dist` directory:
```sh
examples/pybind11-project/dist
├── pybind11_project-0.3.0a2-cp37-cp37m-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp37-cp37m-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp37-cp37m-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp37-cp37m-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp38-cp38-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp38-cp38-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp38-cp38-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp38-cp38-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp39-cp39-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp39-cp39-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp39-cp39-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp39-cp39-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp310-cp310-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp310-cp310-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp310-cp310-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp310-cp310-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp311-cp311-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp311-cp311-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp311-cp311-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp311-cp311-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp312-cp312-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp312-cp312-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp312-cp312-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp312-cp312-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-cp313-cp313-linux_armv6l.whl
├── pybind11_project-0.3.0a2-cp313-cp313-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-cp313-cp313-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a2-cp313-cp313-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-pp37-pypy37_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-pp37-pypy37_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-pp38-pypy38_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-pp38-pypy38_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-pp39-pypy39_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a2-pp39-pypy39_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a2-pp310-pypy310_pp73-manylinux_2_27_aarch64.whl
└── pybind11_project-0.3.0a2-pp310-pypy310_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp37-cp37m-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp37-cp37m-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp37-cp37m-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp37-cp37m-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp38-cp38-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp38-cp38-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp38-cp38-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp38-cp38-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp39-cp39-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp39-cp39-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp39-cp39-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp39-cp39-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp310-cp310-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp310-cp310-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp310-cp310-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp310-cp310-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp311-cp311-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp311-cp311-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp311-cp311-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp311-cp311-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp312-cp312-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp312-cp312-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp312-cp312-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp312-cp312-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-cp313-cp313-linux_armv6l.whl
├── pybind11_project-0.3.0a3-cp313-cp313-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-cp313-cp313-manylinux_2_27_armv7l.whl
├── pybind11_project-0.3.0a3-cp313-cp313-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-pp37-pypy37_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-pp37-pypy37_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-pp38-pypy38_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-pp38-pypy38_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-pp39-pypy39_pp73-manylinux_2_27_aarch64.whl
├── pybind11_project-0.3.0a3-pp39-pypy39_pp73-manylinux_2_27_x86_64.whl
├── pybind11_project-0.3.0a3-pp310-pypy310_pp73-manylinux_2_27_aarch64.whl
└── pybind11_project-0.3.0a3-pp310-pypy310_pp73-manylinux_2_27_x86_64.whl
```

### A closer look at the CMake toolchain files
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal-debug-component/debug/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ authors = [{ "name" = "Pieter P", "email" = "[email protected]" }]
keywords = ["example", "addition", "subtraction", "debug"]
classifiers = []
urls = { "Documentation" = "https://tttapa.github.io/" }
dependencies = ["minimal-comp==0.3.0a3.dev0"]
version = "0.3.0a3.dev0"
dependencies = ["minimal-comp==0.3.0a3"]
version = "0.3.0a3"
description = "Debug symbols for the minimal package."

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build_component"

[tool.py-build-cmake]
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-debug-component/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dynamic = ["version", "description"]

[project.optional-dependencies]
docs = ["sphinx~=5.1", "matplotlib", "breathe", "furo"]
debug = ["minimal-debug==0.3.0a3.dev0"]
debug = ["minimal-debug==0.3.0a3"]

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
A simple, minimal example of building a Python C module using CMake.
"""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
2 changes: 1 addition & 1 deletion examples/minimal-program/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = []
dynamic = ["version", "description"]

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
A simple, minimal example of building a C++ program using CMake.
"""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
2 changes: 1 addition & 1 deletion examples/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ for more information about specific options. More information about the

```toml
[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"
```

Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = []
dynamic = ["version", "description"]

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module]
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/src-python/minimal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
A simple, minimal example of building a Python C module using CMake.
"""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
2 changes: 1 addition & 1 deletion examples/nanobind-project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.26)
project(nanobind-project VERSION 0.3.0)
set(PY_VERSION_SUFFIX "a3.dev0")
set(PY_VERSION_SUFFIX "a3")
set(PY_FULL_VERSION ${PROJECT_VERSION}${PY_VERSION_SUFFIX})

# Make sure that the Python and CMake versions match
Expand Down
2 changes: 1 addition & 1 deletion examples/nanobind-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ add = "nanobind_project.add:main"

[build-system]
requires = [
"py-build-cmake~=0.3.0a3.dev0",
"py-build-cmake~=0.3.0a3",
"nanobind~=2.2.0",
"typing_extensions~=4.12.2; python_version < '3.11'",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Example project using the py-build-cmake build backend and nanobind."""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
2 changes: 1 addition & 1 deletion examples/pybind11-project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.18)
project(pybind11-project VERSION 0.3.0)
set(PY_VERSION_SUFFIX "a3.dev0")
set(PY_VERSION_SUFFIX "a3")
set(PY_FULL_VERSION ${PROJECT_VERSION}${PY_VERSION_SUFFIX})

# Make sure that the Python and CMake versions match
Expand Down
2 changes: 1 addition & 1 deletion examples/pybind11-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test = ["pytest>=7.2.0,<7.5"]

[build-system]
requires = [
"py-build-cmake~=0.3.0a3.dev0",
"py-build-cmake~=0.3.0a3",
"pybind11~=2.13.6",
"pybind11-stubgen~=2.5.1",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Example project using the py-build-cmake build backend and pybind11."""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
else:
import sysconfig as dist_sysconfig

version = "0.3.0a3.dev0"
version = "0.3.0a3"
project_dir = Path(__file__).resolve().parent

examples = "minimal-program", "pybind11-project", "nanobind-project", "minimal"
Expand Down
2 changes: 1 addition & 1 deletion src/py_build_cmake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
extensions built using CMake.
"""

__version__ = "0.3.0a3.dev0"
__version__ = "0.3.0a3"
4 changes: 2 additions & 2 deletions test-packages/bare-c-module/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bare_c_module"
version = "0.3.0a3.dev0"
version = "0.3.0a3"
description = "Single extension module, without any folders or __init__.py"
readme = "README.md"
requires-python = ">=3.7"
Expand All @@ -26,7 +26,7 @@ urls = { "Documentation" = "https://tttapa.github.io/" }
dependencies = []

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module]
Expand Down
4 changes: 2 additions & 2 deletions test-packages/cmake-options/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cmake_options"
version = "0.3.0a3.dev0"
version = "0.3.0a3"
description = "Checks parsing and escaping of CMake options"
readme = "README.md"
requires-python = ">=3.7"
Expand All @@ -12,7 +12,7 @@ urls = { "Documentation" = "https://tttapa.github.io/" }
dependencies = []

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.sdist]
Expand Down
4 changes: 2 additions & 2 deletions test-packages/cmake-preset/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[project]
name = "cmake-preset"
version = "0.3.0a3.dev0"
version = "0.3.0a3"
description = "Test the use of CMake presets"
readme = "README.md"
requires-python = ">=3.7"
license = { "file" = "LICENSE" }
authors = [{ "name" = "Pieter P", "email" = "[email protected]" }]

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.module]
Expand Down
4 changes: 2 additions & 2 deletions test-packages/local-options/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "local_options"
version = "0.3.0a3.dev0"
version = "0.3.0a3"
description = "Checks loading of local override files"
readme = "README.md"
requires-python = ">=3.7"
Expand All @@ -12,7 +12,7 @@ urls = { "Documentation" = "https://tttapa.github.io/" }
dependencies = []

[build-system]
requires = ["py-build-cmake~=0.3.0a3.dev0"]
requires = ["py-build-cmake~=0.3.0a3"]
build-backend = "py_build_cmake.build"

[tool.py-build-cmake.sdist]
Expand Down
2 changes: 1 addition & 1 deletion test-packages/namespace-project-a/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.18)
project(pybind11-project VERSION 0.3.0)
set(PY_VERSION_SUFFIX "a3.dev0")
set(PY_VERSION_SUFFIX "a3")
set(PY_FULL_VERSION ${PROJECT_VERSION}${PY_VERSION_SUFFIX})

# Make sure that the Python and CMake versions match
Expand Down
4 changes: 2 additions & 2 deletions test-packages/namespace-project-a/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "namespace-project-a" # Name on PyPI
version = "0.3.0a3.dev0"
version = "0.3.0a3"
readme = "README.md"
description = "Part A of a namespace package"
requires-python = ">=3.7"
Expand All @@ -13,7 +13,7 @@ dependencies = []

[build-system]
requires = [
"py-build-cmake~=0.3.0a3.dev0",
"py-build-cmake~=0.3.0a3",
"pybind11~=2.13.6",
"pybind11-stubgen~=2.5.1",
]
Expand Down
4 changes: 2 additions & 2 deletions test-packages/namespace-project-b/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "namespace-project-b" # Name on PyPI
version = "0.3.0a3.dev0"
version = "0.3.0a3"
readme = "README.md"
description = "Part B of a namespace package"
requires-python = ">=3.7"
Expand All @@ -13,7 +13,7 @@ dependencies = []

[build-system]
requires = [
"py-build-cmake~=0.3.0a3.dev0",
"py-build-cmake~=0.3.0a3",
]
build-backend = "py_build_cmake.build"

Expand Down

0 comments on commit 80350a3

Please sign in to comment.