diff --git a/.github/codecov.yml b/.github/codecov.yml index e5231cb2..427b235d 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,6 +1,6 @@ codecov: notify: - after_n_builds: 14 + after_n_builds: 13 coverage: status: project: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16d7a08e..00833be4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,15 +87,10 @@ jobs: python39-pip - name: Install - run: python3.9 -m pip install .[test,cov] + run: python3.9 -m pip install .[test] - name: Test package - run: python3.9 -m pytest -ra --showlocals --cov=scikit_build_core - - - name: Upload coverage report - uses: codecov/codecov-action@v3.1.1 - with: - name: ${{ runner.os }}-cygwin3.9 + run: python3.9 -m pytest -ra --showlocals dist: name: Distribution build diff --git a/README.md b/README.md index 670f0e9a..02543f5b 100644 --- a/README.md +++ b/README.md @@ -14,41 +14,39 @@ [![Gitter][gitter-badge]][gitter-link] --> -**WARNING**: Experimental. All configuration subject to change. Only -`scikit_build_core.build` should be used (setuptools backend is experimental and -likely to move to a separate package). +**WARNING**: Only the pyproject-based builder should be used (setuptools backend +is experimental and likely to move to a separate package), and internal API is +still being solidified. A future version of this package will support creating +new build extensions. The following limitations are present compared to classic scikit-build: - The minimum supported CMake is 3.15 - The minimum supported Python is 3.7 -Some of these limitations might be adjusted over time, based on user -requirements & effort / maintainability. +Some know missing features that will be developed soon: -This is very much a WIP, some missing features: - -- The extensionlib integration is missing -- No hatchling plugin yet +- No support for caching between builds +- No editable mode support - The docs are not written -- The logging system isn't ideal yet - Dedicated entrypoints are planned for projects wanting to support discovery - No support for other targets besides install - C++17 is required for the test suite because it's more fun than C++11/14 -- No support for caching between builds -- No editable mode support -- No extra wheel directories (like headers) supported yet - Wheels are not fully reproducible yet - Windows ARM support missing +Other backends are also planned: + +- Setuptools integration highly experimental currently +- The extensionlib integration is missing +- No hatchling plugin yet + Features over classic Scikit-build: - Better warnings, errors, and logging - No warning about unused variables - Automatically adds Ninja and/or CMake only as required - No dependency on setuptools, distutils, or wheel in build mode. -- Closer to vanilla setuptools in setuptools mode, doesn't interfere with - config. - Powerful config system, including config options support in build mode. - Automatic inclusion of site-packages in `CMAKE_PREFIX_PATH` - FindPython is backported if running on CMake < 3.24 (included via hatchling in @@ -80,7 +78,8 @@ version = "0.0.1" ``` You can (and should) specify the rest of the entries in `project`, but these are -the minimum to get started. +the minimum to get started. You can also add the `color` (more colorful +printouts) or `pyproject` (pre-load some dependencies) extras if you want. An example `CMakeLists.txt`: @@ -107,8 +106,6 @@ More examples are in the ## Configuration -Warning: still being developed, some things may change. - All configuration options can be placed in `pyproject.toml`, passed via `-C` options in `pip` or `build` (warning: pip doesn't support list options), or set as environment variables. `tool.scikit-build` is used in toml, `skbuild.` for @@ -131,6 +128,12 @@ ninja.make-fallback = true # entire list). See also cmake.define. cmake.args = [] +# This activates verbose builds +cmake.verbose = false + +# This controls the CMake build type +build_type = "Release" + # Display logs at or above this level. logging.level = "WARNING" @@ -147,11 +150,6 @@ sdist.reproducible = true # is auto-discovered if it's name matches the main name. wheel.packages = ["src/", ""] -# This allows you to change the install dir, such as to the package name. The -# original dir is still at SKBUILD_PLATLIB_DIR (also SKBUILD_DATA_DIR, etc. are -# available) -wheel.install-dir = "." - # Setting py-api to "cp37" would build ABI3 wheels for Python 3.7+. If CPython # is less than this value, or on PyPy, this will be ignored. Setting the api to # "py3" or "py2.py3" would build wheels that don't depend on Python (ctypes, @@ -162,6 +160,11 @@ wheel.py-api = "" # Silicon tags, for pip <21.0.1 compatibility). wheel.expand-macos-universal-tags = false +# This allows you to change the install dir, such as to the package name. The +# original dir is still at SKBUILD_PLATLIB_DIR (also SKBUILD_DATA_DIR, etc. are +# available) +wheel.install-dir = "." + # Enable experimental features if any are available experimental = false @@ -170,7 +173,7 @@ strict-config = true # This provides some backward compatibility if set. Defaults to the latest # scikit-build-core version. -minimum-version = "0.1" # current version +minimum-version = "0.1" # current version [tool.scikit-build.cmake.define] # Put CMake defines in this table. diff --git a/docs/changelog.md b/docs/changelog.md index 378eb4d7..778061fe 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,70 +1,85 @@ # Changelog +## Version 0.1.0b1 + +This release adds a lot of configuration options, including `minimum-version`, +which can be set to 0.0 to ensure defaults remain consistent (similar to +`cmake_minimum_required`). + +### What's Changed + +Features: + +- Dict options by @henryiii in #78 +- Min version setting by @henryiii in #84 +- Strict configuration checking by @henryiii in #75 +- Support for args/define by @henryiii in #83 +- Support for other wheel dirs by @henryiii in #82 +- Support specifying a build type by @henryiii in #90 + +Fixes: + +- Better logging by @henryiii in #88 +- Better macOS deployment target handling by @henryiii in #74 +- Don't touch mtime in non-reproducible mode by @henryiii in #76 +- Fallback to ninja sooner if on known platform by @henryiii in #80 + +Refactoring: + +- Rename CMakeConfig -> CMaker by @henryiii in #91 +- Drop config prefix by @henryiii in #77 +- Rename to `wheel.py-api` and expand, ignore on non-cpython / old cpython by + @henryiii in #81 + +Other things: + +- Add cygwin by @henryiii in #89 + ## Version 0.1.0a1 This release brings a lot of further development. This is starting to be used by downstream projects; it is a good idea to be a little careful with versions still, configuration may change. -## What's Changed - -- feat(pyproject): allow python packages to be specified by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/58 -- feat(pyproject): autocopy packages if names match by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/53 -- feat(pyproject): include/exclude by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/59 -- feat(pyproject): Color status messages for wheel by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/60 -- feat(pyproject): support reproducible sdist builds by @agoose77 in - https://github.com/scikit-build/scikit-build-core/pull/64 -- feat: cmake_source_dir from scikit-build classic by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/45 -- feat: extra_tags by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/49 -- feat: prettier logging with config setting by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/40 -- feat: support for setting python & abi tag (including limited API) by - @henryiii in https://github.com/scikit-build/scikit-build-core/pull/47 -- feat: use setup keyword support by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/42 - -- fix: avoid copy, avoid failure if pre-existing by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/41 -- fix: better support for FindPython by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/38 -- fix: fallback to make if available (setting) by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/57 -- fix: handle `PermissionError` in reading `libdir.is_dir()` by @agoose77 in - https://github.com/scikit-build/scikit-build-core/pull/43 -- fix: include `--config` when installing by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/61 -- fix: incorrect min version of macOS by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/50 -- fix: lists and bool settings by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/56 -- fix: mkdir for sdist if missing, test polish by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/44 -- fix: simple example PyPy support workaround by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/37 - -- refactor(pyproject): tags configuration group by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/55 -- refactor(setuptools): use native bdist_wheel setting for abi3 by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/52 -- refactor: rename `cmake_settings` to `skbuild_settings` by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/46 - -* chore(pyproject): refactor wheel code a bit to read better by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/65 - -- chore: better logging on macOS for deployment target by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/48 -- chore: format cmake files by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/54 - -* tests: reproducible by @henryiii in - https://github.com/scikit-build/scikit-build-core/pull/66 +### What's Changed + +Features: + +- Allow python packages to be specified by @henryiii in #58 +- Autocopy packages if names match by @henryiii in #53 +- Include/exclude by @henryiii in #59 +- Color status messages for wheel by @henryiii in #60 +- Support reproducible sdist builds by @agoose77 in #64 +- Prettier logging with config setting by @henryiii in #40 +- Add `extra-tags` by @henryiii in #49 +- Support for setting python & abi tag (including limited API) by @henryiii in + #47 +- (setuptools) Use setup keyword support by @henryiii in #42 +- (setuptools) `cmake_source_dir` from scikit-build classic by @henryiii in #45 + +Fixes: + +- Avoid copy, avoid failure if pre-existing by @henryiii in #41 +- Better support for FindPython by @henryiii in #38 +- Fallback to make if available (setting) by @henryiii in #57 +- Handle `PermissionError` in reading `libdir.is_dir()` by @agoose77 in #43 +- Include `--config` when installing by @henryiii in #61 +- Incorrect min version of macOS by @henryiii in #50 +- Lists and bool settings by @henryiii in #56 +- Mkdir for sdist if missing, test polish by @henryiii in #44 +- Simple example PyPy support workaround by @henryiii in #37 + +Refactoring: + +- Tags configuration group by @henryiii in #55 +- (setuptools) Use native bdist_wheel setting for abi3 by @henryiii in #52 +- Rename `cmake_settings` to `skbuild_settings` by @henryiii in #46 +- Refactor wheel code a bit to read better by @henryiii in #65 + +Other things: + +- Better logging on macOS for deployment target by @henryiii in #48 +- Format cmake files by @henryiii in #54 ## Version 0.1.0a0