Skip to content

Commit f0fd03d

Browse files
authored
chore: bump to Scikit-Build 0.12 (#15)
* chore: use proper backend and nicer pyproject.toml formatting * style: add basic style checking * chore: use scikit-build 0.12 * ci: drop the windows setup
1 parent d4192f6 commit f0fd03d

36 files changed

+70
-37
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ jobs:
1515
runs-on: [ubuntu-latest, macos-latest, windows-latest]
1616

1717
name: Check on ${{ matrix.runs-on }}
18-
18+
1919
steps:
2020
- uses: actions/checkout@v2
2121
- uses: excitedleigh/[email protected]
2222

23-
- name: Prepare compiler environment (Windows)
24-
if: runner.os == 'Windows'
25-
uses: ilammy/msvc-dev-cmd@v1
26-
2723
- run: nox --force-color

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: requirements-txt-fixer
14+
- id: trailing-whitespace
15+
16+
- repo: https://github.com/PyCQA/flake8
17+
rev: 3.9.2
18+
hooks:
19+
- id: flake8
20+
additional_dependencies: [flake8-bugbear]

projects/hello-cpp/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.18", "ninja"]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel",
5+
"scikit-build>=0.12",
6+
"cmake>=3.18",
7+
"ninja",
8+
]
9+
build-backend = "setuptools.build_meta"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
from ._hello import hello, elevation
2+
3+
4+
__all__ = ("hello", "elevation")
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.18", "ninja", "cython"]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel",
5+
"scikit-build>=0.12",
6+
"cmake>=3.18",
7+
"ninja",
8+
"cython",
9+
]
10+
build-backend = "setuptools.build_meta"

projects/hello-pure/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.18", "ninja"]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel",
5+
"scikit-build>=0.12",
6+
"cmake>=3.18",
7+
"ninja",
8+
]
9+
build-backend = "setuptools.build_meta"

projects/hello-pybind11/pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja"]
2+
requires = [
3+
"setuptools",
4+
"wheel",
5+
"scikit-build>=0.12",
6+
"cmake",
7+
"ninja",
8+
]
39
build-backend = "setuptools.build_meta"
410

511
[tool.pytest.ini_options]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
from ._hello import hello, return_two
2+
3+
4+
__all__ = ("hello", "return_two")

projects/hello-pybind11/tests/test_hello_pybind11.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
import hello
33
import unittest
44

5+
56
class TestHello(unittest.TestCase):
67
def test_hello(self):
78
hello.hello()
89

910
def test_return_two(self):
1011
self.assertEqual(hello.return_two(), 2)
1112

13+
1214
if __name__ == "__main__":
1315
unittest.main()
1416
# You can run all python test with:

projects/pen2-cython/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ find_package(Cython REQUIRED)
99

1010
add_subdirectory(src)
1111
add_subdirectory(scripts)
12-

0 commit comments

Comments
 (0)