diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 6705bfbc387..c5ce830a52b 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -6,7 +6,7 @@ name: cibuildwheel # sample. # The full list of cibuildwheel's build targets can be found here: -# https://github.com/pypa/cibuildwheel/blob/v2.16.5/cibuildwheel/resources/build-platforms.toml +# https://github.com/pypa/cibuildwheel/blob/v2.20.0/cibuildwheel/resources/build-platforms.toml # Notes on build targets we (don't) support: # - pypy: libtorrent doesn't build with pypy as of writing @@ -45,22 +45,26 @@ jobs: MATRIX_PULL_REQUEST: | { "include": [ - {"os": "ubuntu-latest", "CIBW_BUILD": "cp39-manylinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp39-musllinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "macos-12", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "x86_64"}, - {"os": "windows-2022", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "AMD64"} + {"os": "ubuntu-24.04", "CIBW_BUILD": "cp311-manylinux_x86_64"}, + {"os": "ubuntu-24.04", "CIBW_BUILD": "cp311-musllinux_x86_64"}, + {"os": "macos-12", "CIBW_BUILD": "cp311-macosx_x86_64", "MACOSX_DEPLOYMENT_TARGET": "12"}, + {"os": "macos-13", "CIBW_BUILD": "cp311-macosx_x86_64", "MACOSX_DEPLOYMENT_TARGET": "13"}, + {"os": "macos-14", "CIBW_BUILD": "cp311-macosx_arm64", "MACOSX_DEPLOYMENT_TARGET": "14"}, + {"os": "windows-latest", "CIBW_BUILD": "cp311-win_amd64"} ] } MATRIX_WORKFLOW_DISPATCH: | { "include": [ - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"}, - {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"}, - {"os": "macos-12", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"}, - {"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"}, - {"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"} + {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_x86_64"}, + {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_aarch64"}, + {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_x86_64"}, + {"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_aarch64"}, + {"os": "macos-12", "CIBW_BUILD": "cp*-macosx_x86_64", "MACOSX_DEPLOYMENT_TARGET": "12"}, + {"os": "macos-13", "CIBW_BUILD": "cp*-macosx_x86_64", "MACOSX_DEPLOYMENT_TARGET": "13"}, + {"os": "macos-14", "CIBW_BUILD": "cp*-macosx_arm64", "MACOSX_DEPLOYMENT_TARGET": "14"}, + {"os": "windows-latest", "CIBW_BUILD": "cp*-win32"}, + {"os": "windows-latest", "CIBW_BUILD": "cp*-win_amd64"} ] } @@ -87,7 +91,10 @@ jobs: env: CIBW_BUILD_VERBOSITY: 1 CIBW_BUILD: ${{ matrix.CIBW_BUILD }} - CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }} + CIBW_MANYLINUX_*_IMAGE: "manylinux_2_28" + CIBW_MUSLLINUX_*_IMAGE: "musllinux_1_2" + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.MACOSX_DEPLOYMENT_TARGET }} + CIBW_SKIP: pp* CIBW_TEST_SKIP: "*-win32" steps: @@ -101,12 +108,12 @@ jobs: id: cache-wheel with: path: wheelhouse - key: wheel-${{ matrix.CIBW_BUILD }}-${{ matrix.CIBW_ARCHS }}-${{ github.sha }} + key: wheel-${{ matrix.os }}-${{ matrix.CIBW_BUILD }}-${{ github.sha }} - uses: docker/setup-qemu-action@v3 if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux' - - uses: pypa/cibuildwheel@v2.19.2 + - uses: pypa/cibuildwheel@v2.20.0 if: steps.cache-wheel.outputs.cache-hit != 'true' - uses: actions/upload-artifact@v3 @@ -128,8 +135,8 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: wheelhouse - skip_existing: true + packages-dir: wheelhouse + skip-existing: true upload_pypi_test: needs: build_wheels @@ -145,6 +152,6 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - packages_dir: wheelhouse - skip_existing: true + packages-dir: wheelhouse + skip-existing: true repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 75c20bde18c..f8d93eeecf1 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -40,7 +40,7 @@ jobs: - name: install boost run: | - brew install boost-build boost openssl@1.1 + brew install boost-build boost openssl@3 echo "using darwin ;" >>~/user-config.jam - name: build and run tests @@ -75,7 +75,7 @@ jobs: - name: install boost run: | - brew install boost-build boost openssl@1.1 + brew install boost-build boost openssl@3 echo "using darwin ;" >>~/user-config.jam - name: build and run simulations @@ -109,7 +109,7 @@ jobs: - name: install boost run: | - brew install boost-build boost openssl@1.1 + brew install boost-build boost openssl@3 echo "using darwin ;" >>~/user-config.jam - name: build library diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 0b2b3fcc531..ff68cf4ceed 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -33,7 +33,7 @@ jobs: - name: dependencies (MacOS) if: runner.os == 'macOS' run: | - brew install boost-build boost boost-python3 python@3.12 openssl@1.1 python-setuptools + brew install boost-build boost boost-python3 python@3.12 openssl@3 python-setuptools export PATH=$(brew --prefix)/opt/python@3.12/bin:$PATH - name: update package lists (linux) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88b60f3ecc1..68e66217b49 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: #- id: trailing-whitespace #- id: end-of-file-fixer @@ -72,7 +72,7 @@ repos: tools/update_copyright.py )$ - repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 + rev: v2.3.1 hooks: - id: autoflake args: [--in-place, --remove-unused-variables, --remove-all-unused-imports, --remove-duplicate-keys] @@ -86,7 +86,7 @@ repos: tools/libtorrent_lldb.py ) - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.8.0 hooks: - id: black # Avoiding PR bloat @@ -132,7 +132,7 @@ repos: name: black (pyi) types: [pyi] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.11.2 hooks: - id: mypy # Avoiding PR bloat @@ -171,7 +171,7 @@ repos: tools/update_copyright.py )$ - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 exclude: | diff --git a/docs/building.rst b/docs/building.rst index d71e2d417ab..4272e2b2611 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -76,7 +76,7 @@ Linux:: Mac OS:: - brew install boost-build boost openssl@1.1 + brew install boost-build boost openssl@3 echo "using darwin ;" >>~/user-config.jam b2 crypto=openssl cxxstd=14 release diff --git a/pyproject.toml b/pyproject.toml index a31c5dd724a..71e51e099a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -requires-python = ">=3.7" +requires-python = ">=3.11" [tool.cibuildwheel] skip = "{pp*,}" @@ -17,8 +17,7 @@ test-command = [ [tool.cibuildwheel.macos.environment] BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" -MACOSX_DEPLOYMENT_TARGET = "12" +BOOST_VERSION = "1.83.0" PATH = "/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -38,7 +37,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.83.0" PATH = "/usr/local/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -57,7 +56,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.83.0" PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -78,7 +77,7 @@ test-command = '''bash -c "cd '{project}/bindings/python' && python test.py"''' [tool.cibuildwheel.windows.environment] BOOST_BUILD_PATH = 'c:/boost/tools/build' BOOST_ROOT = 'c:/boost' -BOOST_VERSION = "1.81.0" +BOOST_VERSION = "1.83.0" PATH = 'c:/boost;$PATH' [tool.isort] diff --git a/tools/cibuildwheel/manylinux/build-openssl.sh b/tools/cibuildwheel/manylinux/build-openssl.sh index b93e209acad..ff097d93e51 100755 --- a/tools/cibuildwheel/manylinux/build-openssl.sh +++ b/tools/cibuildwheel/manylinux/build-openssl.sh @@ -16,7 +16,7 @@ check_var ${OPENSSL_HASH} check_var ${OPENSSL_DOWNLOAD_URL} OPENSSL_VERSION=${OPENSSL_ROOT#*-} -OPENSSL_MIN_VERSION=1.1.1 +OPENSSL_MIN_VERSION=3.0.14 # || test $? -eq 141 is there to ignore SIGPIPE with set -o pipefail # c.f. https://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141#comment60412687_33026977 diff --git a/tools/cibuildwheel/manylinux/build_utils.sh b/tools/cibuildwheel/manylinux/build_utils.sh index 961e34d0512..9cf8e1fd517 100755 --- a/tools/cibuildwheel/manylinux/build_utils.sh +++ b/tools/cibuildwheel/manylinux/build_utils.sh @@ -5,7 +5,7 @@ # use all flags used by ubuntu 20.04 for hardening builds, dpkg-buildflags --export # other flags mentioned in https://wiki.ubuntu.com/ToolChain/CompilerFlags can't be # used because the distros used here are too old -MANYLINUX_CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" +MANYLINUX_CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=3" MANYLINUX_CFLAGS="-g -O2 -Wall -fdebug-prefix-map=/=. -fstack-protector-strong -Wformat -Werror=format-security" MANYLINUX_CXXFLAGS="-g -O2 -Wall -fdebug-prefix-map=/=. -fstack-protector-strong -Wformat -Werror=format-security" MANYLINUX_LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now" diff --git a/tools/cibuildwheel/manylinux/openssl-version.sh b/tools/cibuildwheel/manylinux/openssl-version.sh index 8c645e1bad8..9bb39f5c1bb 100755 --- a/tools/cibuildwheel/manylinux/openssl-version.sh +++ b/tools/cibuildwheel/manylinux/openssl-version.sh @@ -1,5 +1,5 @@ #!/bin/bash -export OPENSSL_ROOT=openssl-1.1.1l -export OPENSSL_HASH=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1 +export OPENSSL_ROOT=openssl-3.0.14 +export OPENSSL_HASH=eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca export OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source