Skip to content

Commit

Permalink
Merge branch 'master' into scikit-build-core
Browse files Browse the repository at this point in the history
* master: (112 commits)
  docs: fix up docs (scikit-build#454)
  chore(deps): update pre-commit hooks (scikit-build#443)
  chore(deps): bump cmake from 3.28.1 to 3.28.3 (scikit-build#452)
  chore(deps): bump the actions group with 1 update (scikit-build#453)
  Update to CMake 3.28.3 (scikit-build#450)
  chore(ci): use 4 threads to compile on GHA (scikit-build#449)
  Update to OpenSSL 3.0.13 (scikit-build#448)
  chore(deps): bump the actions group with 1 update (scikit-build#447)
  chore(deps): update pre-commit hooks (scikit-build#441)
  ci: group dependabot updates (scikit-build#442)
  chore(deps): bump cmake from 3.27.9 to 3.28.1 (scikit-build#440)
  Update to CMake 3.28.1 (scikit-build#439)
  ci: support artifact v4 (scikit-build#438)
  chore(deps): bump actions/upload-artifact from 3 to 4
  chore(deps): bump actions/download-artifact from 3 to 4
  Update to CMake 3.28.0
  chore(deps): update pre-commit hooks
  chore(deps): bump actions/setup-python from 4 to 5 (scikit-build#431)
  chore(deps): bump cmake from 3.27.7 to 3.27.9 (scikit-build#430)
  Update to CMake 3.27.9 (scikit-build#429)
  ...
  • Loading branch information
jcfr committed Feb 15, 2024
2 parents deb8084 + 30a96f6 commit f4a17c3
Show file tree
Hide file tree
Showing 33 changed files with 297 additions and 2,576 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/cmake/_version.py export-subst
.git_archival.txt export-subst
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
groups:
actions:
patterns:
- "*"
# Maintain dependencies for pip constraints-ci.txt
- package-ecosystem: "pip"
directory: "/"
Expand Down
83 changes: 55 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
tags:
- "*.*.*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
USE_QEMU: ${{ fromJSON(github.event.inputs.use_qemu || 'false') || (github.event_name == 'schedule') || startsWith(github.ref, 'refs/tags/') }}

Expand All @@ -25,11 +29,11 @@ jobs:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1


build_wheels:
Expand Down Expand Up @@ -84,6 +88,10 @@ jobs:
arch: "AMD64"
build: ""
use_qemu: false
- os: windows-2022
arch: "ARM64"
build: ""
use_qemu: false
- os: windows-2019
arch: "x86"
build: ""
Expand All @@ -94,25 +102,26 @@ jobs:
use_qemu: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
fetch-depth: 0 # required for versioneer to find tags

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.0.0
if: matrix.use_qemu && fromJSON(env.USE_QEMU)

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.5
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_BUILD: "cp39-${{ matrix.build }}*"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
name: Wheel-${{ matrix.os }}-${{ matrix.build }}${{ matrix.arch }}
path: ./wheelhouse/*.whl

build_manylinux2010_wheels:
Expand All @@ -127,36 +136,38 @@ jobs:
- arch: "i686"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for versioneer to find tags

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_BUILD: "cp39-manylinux_*"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2010"
CIBW_MANYLINUX_I686_IMAGE: "manylinux2010"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Wheel-manylinux2010-${{ matrix.arch }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
needs: [lint]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for versioneer to find tags

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: SDist
path: dist/*.tar.gz

test_sdist:
Expand All @@ -167,24 +178,35 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["2.7", "3.6", "3.7", "3.11"]
python: ["2.7", "3.6", "3.7", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
if: matrix.python != '2.7'
name: Install Python ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}

- name: Install Ubuntu Python 2.7
if: matrix.python == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python2 python3-virtualenv
virtualenv -p python2 ${HOME}/cp27
${HOME}/cp27/bin/python -m pip install -U pip
${HOME}/cp27/bin/python -m pip install -U setuptools wheel
echo "${HOME}/cp27/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libssl-dev
pip install pytest pytest-virtualenv virtualenv pytest-cov
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
name: SDist
path: dist

- name: Install SDist
Expand All @@ -203,25 +225,30 @@ jobs:
needs: [build_wheels, build_manylinux2010_wheels, build_sdist, test_sdist]
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
path: all

- run: pipx run twine check --strict dist/*
- run: pipx run twine check --strict all/*/*

upload_pypi:
name: Upload to PyPI
needs: [check_dist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'scikit-build/cmake-python-distributions' && startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
url: https://pypi.org/p/cmake
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
path: all

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
password: ${{ secrets.PYPI_RELEASE_PASSWORD }}
- name: Merge files
run: |
mkdir dist
mv all/*/* dist/.
- uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ docs/_build
# IDE junk
.idea/*
*.swp

# Output from cibuildwheel
wheelhouse/

# Version
_version.py
20 changes: 5 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -18,18 +18,8 @@ repos:
- id: trailing-whitespace
- id: fix-encoding-pragma

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.2.1"
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
hooks:
- id: pyupgrade

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
- id: ruff
args: [--fix, --show-fixes]
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

sphinx:
configuration: docs/conf.py

build:
os: ubuntu-22.04
tools:
python: "3.12"

python:
install:
- requirements: docs/requirements-docs.txt
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ if(CMakePythonDistributions_SUPERBUILD)
endif()
if(WIN32)
set(binary_archive "win32_binary")
if((CMAKE_SIZEOF_VOID_P EQUAL 8) AND NOT(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64"))
set(binary_archive "win64_binary")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64" OR "$ENV{SETUPTOOLS_EXT_SUFFIX}" MATCHES arm64)
set(binary_archive "winarm64_binary")
else()
set(binary_archive "win64_binary")
endif()
endif()
endif()
check_archive_var("${binary_archive}")
Expand Down Expand Up @@ -282,10 +286,15 @@ set(CMAKE_EXE_LINKER_FLAGS \"-lstdc++ -lgcc -lrt\" CACHE STRING \"Initial cache\
endif()

if(RUN_CMAKE_TEST)
include(ProcessorCount)
ProcessorCount(NB_CPU)
if(NB_CPU EQUAL 0)
set(NB_CPU 2)
endif()
ExternalProject_Add_Step(CMakeProject-build run_cmake_test_suite
DEPENDEES ${CMAKEPROJECT_BUILD_LAST_STEP}
COMMENT "Running CMake test suite, exclusion list: '${RUN_CMAKE_TEST_EXCLUDE}'"
COMMAND ./bin/ctest --force-new-ctest-process --stop-on-failure --output-on-failure -j2 -E ${RUN_CMAKE_TEST_EXCLUDE}
COMMAND ./bin/ctest --force-new-ctest-process --stop-on-failure --output-on-failure -j${NB_CPU} -E ${RUN_CMAKE_TEST_EXCLUDE}
WORKING_DIRECTORY ${CMakeProject_BINARY_DIR}
USES_TERMINAL 1
)
Expand Down
27 changes: 15 additions & 12 deletions CMakeUrls.cmake
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@

#-----------------------------------------------------------------------------
# CMake sources
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0.tar.gz")
set(unix_source_sha256 "306463f541555da0942e6f5a0736560f70c487178b9d94a5ae7f34d0538cdd48")
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3.tar.gz")
set(unix_source_sha256 "72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1")

set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0.zip")
set(windows_source_sha256 "45f1668b543ea2022387321930ad22cbcb5e6cef5e7e786f68f2ffc7fd2d66b5")
set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3.zip")
set(windows_source_sha256 "b54943b9c98ac66061e9b97fd630b3f06a75a85143a561ef2dca88aa0e042c60")

#-----------------------------------------------------------------------------
# CMake binaries

set(linux32_binary_url "NA") # Linux 32-bit binaries not available
set(linux32_binary_sha256 "NA")

set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-linux-x86_64.tar.gz")
set(linux64_binary_sha256 "ac634d6f0a81d7089adc7be5acff66a6bee3b08615f9a947858ce92a9ef59c8b")
set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz")
set(linux64_binary_sha256 "804d231460ab3c8b556a42d2660af4ac7a0e21c98a7f8ee3318a74b4a9a187a6")

set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-macos10.10-universal.tar.gz")
set(macos10_10_binary_sha256 "d0e0849e8198f4637c0c863704d214af8eeabfaaa3a4f72725f3f8c10338bf92")
set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-macos10.10-universal.tar.gz")
set(macos10_10_binary_sha256 "5541339751cb96d1b03eb3244df7e750cd4e1dcb361ebbd68a179493dfccc5bf")

set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-windows-i386.zip")
set(win32_binary_sha256 "ddd115257a19ff3dd18fc63f32a00ae742f8b62d2e39bc354629903512f99783")
set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-windows-i386.zip")
set(win32_binary_sha256 "411812b6b29ac793faf69bdbd36c612f72659363c5491b9f0a478915db3fc58c")

set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-windows-x86_64.zip")
set(win64_binary_sha256 "b46030c10cab1170355952f9ac59f7e6dabc248070fc53f15dff11d4ed2910f8")
set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-windows-x86_64.zip")
set(win64_binary_sha256 "cac7916f7e1e73a25de857704c94fd5b72ba9fe2f055356b5602d2f960e50e5b")

set(winarm64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-windows-arm64.zip")
set(winarm64_binary_sha256 "cfe023b7e82812ef802fb1ec619f6cfa2fdcb58ee61165fc315086286fe9cdcc")
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines:
feature to the list in `README.rst`.

3. The pull request should work for Python 2.7, and 3.6+.
Check `GitHub Actions https://github.com/scikit-build/cmake-python-distributions/actions/workflows/build.yml`_
Check `GitHub Actions <https://github.com/scikit-build/cmake-python-distributions/actions/workflows/build.yml>`_
and make sure that the tests pass for all supported Python versions.


Expand Down
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ History

cmake-python-distributions was initially developed in September 2016 by
Jean-Christophe Fillion-Robin to facilitate the distribution of project using
`scikit-build <http://scikit-build.readthedocs.io/>`_ and depending on CMake.
`scikit-build <https://scikit-build.readthedocs.io/>`_ and depending on CMake.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include LICENSE_BSD_3
recursive-exclude _skbuild *
recursive-exclude CMake-src *

include versioneer.py
include src/cmake/_version.py
include src/cmake/_version.pyi
include src/cmake/__init__.pyi
include src/cmake/py.typed
Loading

0 comments on commit f4a17c3

Please sign in to comment.