Skip to content

Commit 04918fc

Browse files
authored
Merge pull request #296 from lonvia/pybind-v3
Update to next pybind major version 3
2 parents 9d7d585 + 0b1e37d commit 04918fc

File tree

5 files changed

+17
-47
lines changed

5 files changed

+17
-47
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ jobs:
2323
- name: Typecheck package
2424
run: mypy src
2525

26-
- name: Set up Python 3.7
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: 3.7
30-
31-
- name: Build package 3.7
32-
run: |
33-
pip install build wheel
34-
python -m build
35-
shell: bash
36-
3726
- name: Set up Python 3.8
3827
uses: actions/setup-python@v5
3928
with:
@@ -93,7 +82,6 @@ jobs:
9382
uses: actions/setup-python@v5
9483
with:
9584
python-version: "3.13"
96-
allow-prereleases: true
9785

9886
- name: Build package 3.13
9987
run: |
@@ -114,7 +102,7 @@ jobs:
114102
strategy:
115103
fail-fast: false
116104
matrix:
117-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
105+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
118106

119107
steps:
120108
- uses: actions/checkout@v4
@@ -159,14 +147,14 @@ jobs:
159147
cc: gcc-10
160148
cxx: g++-10
161149
platform: ubuntu-22.04
162-
python: 3.7
150+
python: 3.8
163151
deps: release
164152
flavour: linux
165153
- compiler: clang-old
166154
cc: clang-13
167155
cxx: clang++-13
168156
platform: ubuntu-22.04
169-
python: 3.7
157+
python: 3.8
170158
deps: release
171159
flavour: linux
172160
- compiler: gcc
@@ -268,19 +256,6 @@ jobs:
268256
run: vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows boost-variant:x64-windows boost-iterator:x64-windows lz4:x86-windows
269257
shell: bash
270258

271-
- name: Set up Python 3.7
272-
uses: actions/setup-python@v5
273-
with:
274-
python-version: 3.7
275-
276-
- name: Build package 3.7
277-
run: |
278-
pip install build wheel
279-
python -m build
280-
shell: bash
281-
env:
282-
CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
283-
284259
- name: Set up Python 3.8
285260
uses: actions/setup-python@v5
286261
with:
@@ -350,7 +325,6 @@ jobs:
350325
uses: actions/setup-python@v5
351326
with:
352327
python-version: "3.13"
353-
allow-prereleases: true
354328

355329
- name: Build package 3.13
356330
run: |
@@ -373,7 +347,7 @@ jobs:
373347
strategy:
374348
fail-fast: false
375349
matrix:
376-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
350+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
377351

378352
env:
379353
PYTEST_ADDOPTS: ${{ matrix.test-args }}

CMakeLists.txt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cmake_minimum_required(VERSION 3.8.0)
2-
project(pyosmium VERSION 3.6.0)
1+
cmake_minimum_required(VERSION 3.15.0)
2+
project(pyosmium VERSION 4.0.2)
33

44
option(WITH_LZ4 "Build with lz4 support for PBF files" ON)
55

@@ -29,22 +29,19 @@ if(NOT "${CMAKE_CXX_STANDARD}")
2929
set(CMAKE_CXX_STANDARD 17)
3030
endif()
3131

32-
# required for pybind11 < 2.6
33-
if(MSVC)
34-
set(PYBIND11_CPP_STANDARD /std=c++${CMAKE_CXX_STANDARD})
35-
else()
36-
set(PYBIND11_CPP_STANDARD -std=c++${CMAKE_CXX_STANDARD})
37-
endif()
32+
set(PYBIND11_CPP_STANDARD -std=c++${CMAKE_CXX_STANDARD})
3833

3934
message(STATUS "Building in C++${CMAKE_CXX_STANDARD} mode")
4035

36+
find_package(Python COMPONENTS Interpreter Development)
37+
4138
if(PYBIND11_PREFIX)
4239
add_subdirectory(${PYBIND11_PREFIX} contrib/pybind11)
4340
else()
44-
find_package(pybind11 2.7 REQUIRED)
41+
find_package(pybind11 2.9 REQUIRED)
4542
endif()
4643

47-
find_package(Boost 1.41 REQUIRED COMPONENTS)
44+
find_package(Boost 1.70 REQUIRED COMPONENTS)
4845
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
4946

5047
function(set_module_output module outdir)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manner.
88

99
## Installation
1010

11-
Pyosmium works with Python >= 3.7. Pypy is known to not work.
11+
Pyosmium works with Python >= 3.8. Pypy is known to not work.
1212

1313
### Using Pip
1414

@@ -40,7 +40,7 @@ pyosmium has the following dependencies:
4040
* [expat](https://libexpat.github.io/)
4141
* [libz](https://www.zlib.net/)
4242
* [libbz2](https://www.sourceware.org/bzip2/)
43-
* [Boost](https://www.boost.org/) variant and iterator >= 1.41
43+
* [Boost](https://www.boost.org/) variant and iterator >= 1.70
4444
* [Python Requests](https://docs.python-requests.org/)
4545
* Python setuptools
4646
* a C++17-compatible compiler (Clang 13+, GCC 10+ are supported)

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "osmium"
77
description = "Python bindings for libosmium, the data processing library for OSM data"
88
readme = "README.rst"
9-
requires-python = ">=3.7"
9+
requires-python = ">=3.8"
1010
license = {text = 'BSD-2-Clause'}
1111
authors = [
1212
{name = "Sarah Hoffmann", email = "[email protected]"}
@@ -19,7 +19,6 @@ classifiers = [
1919
"Development Status :: 5 - Production/Stable",
2020
"Intended Audience :: Developers",
2121
"License :: OSI Approved :: BSD License",
22-
"Programming Language :: Python :: 3.7",
2322
"Programming Language :: Python :: 3.8",
2423
"Programming Language :: Python :: 3.9",
2524
"Programming Language :: Python :: 3.10",

src/osmium/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# This file is part of pyosmium. (https://osmcode.org/pyosmium/)
44
#
5-
# Copyright (C) 2024 Sarah Hoffmann <[email protected]> and others.
5+
# Copyright (C) 2025 Sarah Hoffmann <[email protected]> and others.
66
# For a full list of authors see the git log.
77
"""
88
Version information.
@@ -16,6 +16,6 @@
1616
# libosmium version shipped with the Pip release
1717
libosmium_version = '2.20.0'
1818
# protozero version shipped with the Pip release
19-
protozero_version = '1.7.1'
19+
protozero_version = '1.8.1'
2020
# pybind11 version shipped with the Pip release
21-
pybind11_version = '2.13.6'
21+
pybind11_version = '3.0.0'

0 commit comments

Comments
 (0)