|
1 | 1 | [build-system] |
2 | | -requires = [ |
3 | | - "scikit-build>=0.12", |
4 | | - "setuptools>=42", |
5 | | - "setuptools-scm[toml]", |
| 2 | +requires = ["scikit-build-core"] |
| 3 | +build-backend = "scikit_build_core.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "cmake" |
| 7 | +description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" |
| 8 | +keywords = ["CMake", "build", "c++", "fortran", "cross-platform", "cross-compilation"] |
| 9 | +readme = "README.rst" |
| 10 | +license = {text = "Apache 2.0"} |
| 11 | +authors = [ |
| 12 | + { name = "Jean-Christophe Fillion-Robin", email = "[email protected]"}, |
| 13 | +] |
| 14 | +classifiers = [ |
| 15 | + "License :: OSI Approved :: Apache Software License", |
| 16 | + "License :: OSI Approved :: BSD License", |
| 17 | + "Programming Language :: C", |
| 18 | + "Programming Language :: C++", |
| 19 | + "Programming Language :: Fortran", |
| 20 | + "Programming Language :: Python", |
| 21 | + "Operating System :: OS Independent", |
| 22 | + "Development Status :: 5 - Production/Stable", |
| 23 | + "Intended Audience :: Developers", |
| 24 | + "Topic :: Software Development :: Build Tools", |
| 25 | + "Typing :: Typed" |
| 26 | +] |
| 27 | +dynamic = ["version"] |
| 28 | +# requires-python = ">=3.7" this is only required to build the wheel. We're still compatible with python 2.7 |
| 29 | + |
| 30 | +[project.urls] |
| 31 | +Homepage = "https://cmake.org" |
| 32 | +Documentation = "https://cmake-python-distributions.readthedocs.io" |
| 33 | +Source = "ttps://github.com/scikit-build/cmake-python-distributions" |
| 34 | +"Mailing list" = "https://groups.google.com/forum/#!forum/scikit-build" |
| 35 | +"Bug Tracker" = "https://github.com/scikit-build/cmake-python-distributions/issues" |
| 36 | + |
| 37 | +[project.optional-dependencies] |
| 38 | +test = [ |
| 39 | + "coverage>=4.2", |
| 40 | + "importlib_metadata>=2.0; python_version<'3.10'", |
| 41 | + "pytest>=3.0.3", |
| 42 | + "pytest-cov>=2.4.0", |
6 | 43 | ] |
7 | | -build-backend = "setuptools.build_meta" |
| 44 | + |
| 45 | +[project.scripts] |
| 46 | +cmake = "cmake:cmake" |
| 47 | +cpack = "cmake:cpack" |
| 48 | +ctest = "cmake:ctest" |
| 49 | + |
| 50 | +[tool.scikit-build] |
| 51 | +minimum-version = "0.8" |
| 52 | +build-dir = "build/{wheel_tag}" |
| 53 | +metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" |
| 54 | +ninja.make-fallback = false |
| 55 | +sdist.include = ["src/cmake/_version.py"] |
| 56 | +wheel.py-api = "py2.py3" |
| 57 | +wheel.expand-macos-universal-tags = true |
| 58 | +wheel.install-dir = "cmake/data" |
8 | 59 |
|
9 | 60 | [tool.setuptools_scm] |
10 | 61 | write_to = "src/cmake/_version.py" |
| 62 | +# Setuptools-scm includes type annotations in the default template |
| 63 | +write_to_template = "version = '{version}'" |
11 | 64 |
|
12 | 65 | [tool.cibuildwheel] |
13 | 66 | build = "cp39-*" |
14 | | -before-all = [ |
15 | | - 'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake', |
16 | | - 'cmake --version', |
17 | | - 'pipx install -f --pip-args="-c {project}/constraints-ci.txt" ninja', |
18 | | - 'ninja --version', |
19 | | -] |
20 | | -before-build = "pip install -r requirements-repair.txt" |
21 | | -repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}" |
22 | 67 | test-extras = "test" |
23 | 68 | test-command = "pytest {project}/tests" |
24 | 69 | build-verbosity = 1 |
25 | 70 |
|
26 | 71 | [tool.cibuildwheel.linux] |
27 | 72 | before-all = [ |
28 | | - 'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake', |
29 | | - 'cmake --version', |
30 | | - 'pipx install -f --pip-args="-c {project}/constraints-ci.txt" ninja', |
31 | | - 'ninja --version', |
32 | 73 | './scripts/manylinux-build-and-install-openssl.sh', |
33 | 74 | ] |
34 | | -environment = { SKBUILD_CONFIGURE_OPTIONS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11" } |
| 75 | +environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11" } |
35 | 76 |
|
36 | 77 | [[tool.cibuildwheel.overrides]] |
37 | 78 | select = ["*-manylinux_aarch64", "*-manylinux_ppc64le", "*-manylinux_s390x"] |
38 | 79 | # disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA |
39 | | -environment = { SKBUILD_CONFIGURE_OPTIONS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11 -DRUN_CMAKE_TEST:BOOL=OFF" } |
| 80 | +environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11 -DRUN_CMAKE_TEST:BOOL=OFF" } |
40 | 81 |
|
41 | 82 | [[tool.cibuildwheel.overrides]] |
42 | 83 | select = ["*-musllinux_x86_64", "*-musllinux_i686"] |
43 | 84 | # disable some tests |
44 | 85 | # - BootstrapTest fails with custom OpenSSL and probably does not make much sense for this project |
45 | 86 | # - ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES: c.f. https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064 |
46 | | -environment = { SKBUILD_CONFIGURE_OPTIONS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST_EXCLUDE:STRING='BootstrapTest|ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES'" } |
| 87 | +environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST_EXCLUDE:STRING='BootstrapTest|ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES'" } |
47 | 88 |
|
48 | 89 | [[tool.cibuildwheel.overrides]] |
49 | 90 | select = ["*-musllinux_aarch64", "*-musllinux_ppc64le", "*-musllinux_s390x"] |
50 | 91 | # disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA |
51 | | -environment = { SKBUILD_CONFIGURE_OPTIONS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST:BOOL=OFF" } |
| 92 | +environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST:BOOL=OFF" } |
52 | 93 |
|
53 | 94 | [tool.cibuildwheel.macos.environment] |
54 | 95 | MACOSX_DEPLOYMENT_TARGET = "10.10" |
|
0 commit comments