Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f08af2
chore(build): move to scikitbuild-core
mayeut Nov 5, 2022
162cc1b
debug sdist build
mayeut Nov 5, 2022
7d1193d
tests: missing dep
henryiii Nov 6, 2022
ffb30f1
fix: more logging
henryiii Nov 7, 2022
a4be5aa
fix: avoid make fallback
henryiii Nov 15, 2022
8ae0687
fix: use more scikit-build-core options
henryiii Nov 16, 2022
55ab191
Update pyproject.toml
henryiii Nov 17, 2022
deb8084
Update pyproject.toml
henryiii Nov 17, 2022
a232567
Merge branch 'master' into scikit-build-core
jcfr Feb 15, 2024
46e26bc
fix: Remove unneeded MANIFEST.in file
jcfr Feb 15, 2024
29de4a9
fix: Remove unneeded setup.cfg file
jcfr Feb 15, 2024
8a9654e
fix: Add missing sdist.include for _version.py
jcfr Feb 15, 2024
38da55b
fix: Add missing metadata.version.provider
jcfr Feb 15, 2024
5b1ad88
fix: Set scikit-build `minimum-version` and `build-dir`
jcfr Feb 15, 2024
c4fe12c
fix: Drop support for building sdist on Python 2.7 and 3.6
jcfr Feb 15, 2024
3da2d85
fix(ci): Fix 3.12 sdist test removing unneeded install of pytest-virt…
jcfr Feb 15, 2024
641b738
fix: Update test_cmake to support Python 3.12
jcfr Feb 15, 2024
1ef08ee
chore(CI): bump runners
mayeut Feb 18, 2024
dac29e6
chore(ci): test with python 2.7 & 3.5
mayeut Feb 18, 2024
02d6827
fix: version template
mayeut Feb 18, 2024
92431eb
fix: tests with python 3.5
mayeut Feb 18, 2024
9e9a28a
Update tests/test_cmake.py
mayeut Feb 19, 2024
7ee8a27
feat: Update scikit-build-core minimum version from 0.4 to 0.8
jcfr Feb 19, 2024
b054ef2
fix: Set DOWNLOAD_EXTRACT_TIMESTAMP to 1 if build with CMake >= 3.24
jcfr Feb 19, 2024
2d6f1dc
fix: Ensure inner project is always re-configured
jcfr Feb 19, 2024
0e0d94d
fix: Support default "redirect" mode for editable install with Python…
jcfr Feb 19, 2024
5acd447
fix: Set CMAKE_DATA as a string to support Python 3.5
jcfr Feb 25, 2024
dada884
Update pyproject.toml
henryiii Mar 1, 2024
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
100 changes: 66 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -44,43 +44,43 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "x86_64"
build: "manylinux_"
use_qemu: false
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "x86_64"
build: "musllinux_"
use_qemu: false
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "i686"
build: "manylinux_"
use_qemu: false
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "i686"
build: "musllinux_"
use_qemu: false
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "aarch64"
build: "manylinux_"
use_qemu: true
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "aarch64"
build: "musllinux_"
use_qemu: true
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "ppc64le"
build: "manylinux_"
use_qemu: true
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "ppc64le"
build: "musllinux_"
use_qemu: true
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "s390x"
build: "manylinux_"
use_qemu: true
- os: ubuntu-22.04
- os: ubuntu-latest
arch: "s390x"
build: "musllinux_"
use_qemu: true
Expand All @@ -96,8 +96,8 @@ jobs:
arch: "x86"
build: ""
use_qemu: false
- os: macos-11
arch: "x86_64"
- os: macos-14
arch: "universal2"
build: ""
use_qemu: false

Expand All @@ -121,13 +121,13 @@ jobs:
- uses: actions/upload-artifact@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
name: Wheel-${{ matrix.os }}-${{ matrix.build }}${{ matrix.arch }}
name: Wheel-${{ runner.os }}-${{ matrix.build }}${{ matrix.arch }}
path: ./wheelhouse/*.whl

build_manylinux2010_wheels:
name: Build ${{ matrix.arch }} manylinux2010 wheels
needs: [lint]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -153,10 +153,53 @@ jobs:
name: Wheel-manylinux2010-${{ matrix.arch }}
path: ./wheelhouse/*.whl

test_old_pythons:
name: Test wheel with python ${{ matrix.python }}
needs: [build_wheels]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python: ["2.7", "3.5"]
steps:
- 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 Python ${{ matrix.python }}
if: matrix.python == '2.7'
shell: bash
run: |
nuget install python2 -Version 2.7.18 -OutputDirectory '${{ runner.temp }}'
echo '${{ runner.temp }}\python2.2.7.18\tools' >> $GITHUB_PATH

- name: Install dependencies
shell: bash
run: |
python -m pip install -U pip
python -m pip install pytest pytest-cov

- uses: actions/download-artifact@v4
with:
name: Wheel-Windows-AMD64
path: wheelhouse

- name: Install wheel
shell: bash
run: |
python -m pip -V
python -m pip install "$(find wheelhouse -name '*.whl')[test]"

- name: Test installed SDist
run: python -m pytest ./tests

build_sdist:
name: Build source distribution
needs: [lint]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -173,36 +216,24 @@ jobs:
test_sdist:
name: Test SDist with python ${{ matrix.python }}
needs: [build_sdist]
# 22.04 doesn't have 2.7 or 3.6
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["2.7", "3.6", "3.12"]
python: ["3.7", "3.12"]

steps:
- 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 -r requirements-test.txt
pip install pytest pytest-cov

- uses: actions/download-artifact@v4
with:
Expand All @@ -211,8 +242,9 @@ jobs:

- name: Install SDist
env:
SKBUILD_CONFIGURE_OPTIONS: "-DBUILD_CMAKE_FROM_SOURCE:BOOL=OFF"
CMAKE_ARGS: "-DBUILD_CMAKE_FROM_SOURCE:BOOL=OFF"
run: |
pip -V
pip install dist/*.tar.gz
rm -rf dist

Expand All @@ -221,8 +253,8 @@ jobs:

check_dist:
name: Check dist
needs: [build_wheels, build_manylinux2010_wheels, build_sdist, test_sdist]
runs-on: ubuntu-22.04
needs: [build_wheels, build_manylinux2010_wheels, test_old_pythons, build_sdist, test_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ develop-eggs
.installed.cfg
lib
lib64
wheelhouse

# Installer logs
pip-log.txt
Expand Down
25 changes: 24 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ if(CMakePythonDistributions_SUPERBUILD)
)
endfunction()

# Add an external project step named `forceconfigure` to `project_name` ensuring
# the project will always be reconfigured.
#
# Copied from ExternalProjectDependency.cmake (commontk/Artichoke@613e3739a)
function(cpd_ExternalProject_AlwaysConfigure proj)
_ep_get_step_stampfile(${proj} "configure" stampfile)
ExternalProject_Add_Step(${proj} forceconfigure
COMMAND ${CMAKE_COMMAND} -E remove ${stampfile}
COMMENT "Forcing configure step for '${proj}'"
DEPENDEES build
ALWAYS 1
)
endfunction()

# Note: To minimize confusion between variables defined by CMake and
# variables used in this project. The following convention applies:
# CMakeProject_xxx : Variables defined in this project
Expand All @@ -128,6 +142,12 @@ if(CMakePythonDistributions_SUPERBUILD)
)
endif()

set(ep_download_extract_timestamp_arg)
if(CMAKE_VERSION VERSION_EQUAL "3.24" OR CMAKE_VERSION VERSION_GREATER "3.24")
# See https://cmake.org/cmake/help/latest/policy/CMP0135.html
set(ep_download_extract_timestamp_arg DOWNLOAD_EXTRACT_TIMESTAMP 1)
endif()

#
# CMakeProject_SOURCE_DIR: Always expect the sources (needed for `sdist`)
#
Expand All @@ -145,6 +165,7 @@ if(CMakePythonDistributions_SUPERBUILD)
BUILD_COMMAND ""
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
${ep_download_extract_timestamp_arg}
${ep_download_no_progress_args}
)
message(STATUS "SuperBuild - CMakeProject-src-download")
Expand Down Expand Up @@ -338,6 +359,7 @@ set(CMAKE_EXE_LINKER_FLAGS \"-lstdc++ -lgcc -lrt\" CACHE STRING \"Initial cache\
BUILD_COMMAND ""
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
${ep_download_extract_timestamp_arg}
${ep_download_no_progress_args}
)
message(STATUS "SuperBuild - CMakeProject-binary-download")
Expand Down Expand Up @@ -368,6 +390,8 @@ set(CMAKE_EXE_LINKER_FLAGS \"-lstdc++ -lgcc -lrt\" CACHE STRING \"Initial cache\
)
message(STATUS "SuperBuild - ${PROJECT_NAME}")

cpd_ExternalProject_AlwaysConfigure(${PROJECT_NAME})

# This adds an "install" target in the top-level directory. The
# target will simply include the install rules associated with the
# inner build
Expand Down Expand Up @@ -436,5 +460,4 @@ include\(\"${CMakeProject_BINARY_DIR}/cmake_install.cmake\")
install(${type} ${file} DESTINATION "${relative_directory}" ${_permissions})
endforeach()
endif()

endif()
15 changes: 0 additions & 15 deletions MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions constraints-ci.txt

This file was deleted.

Loading