just-buildit 0.3.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- just_buildit-0.3.11/.github/workflows/ci.yml +145 -0
- just_buildit-0.3.11/.github/workflows/docs.yml +65 -0
- just_buildit-0.3.11/.github/workflows/release.yml +174 -0
- just_buildit-0.3.11/.gitignore +29 -0
- just_buildit-0.3.11/.pre-commit-config.yaml +52 -0
- just_buildit-0.3.11/.python-version +1 -0
- just_buildit-0.3.11/CHANGELOG.md +368 -0
- just_buildit-0.3.11/LICENSE +21 -0
- just_buildit-0.3.11/Makefile +139 -0
- just_buildit-0.3.11/PKG-INFO +133 -0
- just_buildit-0.3.11/README.md +103 -0
- just_buildit-0.3.11/docs/assets/logo-wordmark.png +0 -0
- just_buildit-0.3.11/docs/assets/logo-wordmark.svg +52 -0
- just_buildit-0.3.11/docs/assets/logo.png +0 -0
- just_buildit-0.3.11/docs/assets/logo.svg +32 -0
- just_buildit-0.3.11/docs/configuration.md +148 -0
- just_buildit-0.3.11/docs/contributing.md +112 -0
- just_buildit-0.3.11/docs/environment-variables.md +96 -0
- just_buildit-0.3.11/docs/examples.md +737 -0
- just_buildit-0.3.11/docs/index.md +75 -0
- just_buildit-0.3.11/docs/llms.txt +22 -0
- just_buildit-0.3.11/docs/posts/announcement-draft.md +20 -0
- just_buildit-0.3.11/docs/posts/python-c-extensions-shouldnt-be-this-hard.md +156 -0
- just_buildit-0.3.11/examples/bazel/BUILD.bazel +12 -0
- just_buildit-0.3.11/examples/bazel/WORKSPACE +1 -0
- just_buildit-0.3.11/examples/bazel/build_ext.py +23 -0
- just_buildit-0.3.11/examples/bazel/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/bazel/src/greeter.c +32 -0
- just_buildit-0.3.11/examples/cmake/CMakeLists.txt +30 -0
- just_buildit-0.3.11/examples/cmake/Makefile +8 -0
- just_buildit-0.3.11/examples/cmake/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/cmake/src/add.c +29 -0
- just_buildit-0.3.11/examples/make/pyproject.toml +14 -0
- just_buildit-0.3.11/examples/make/src/add/add.c +30 -0
- just_buildit-0.3.11/examples/meson/Makefile +9 -0
- just_buildit-0.3.11/examples/meson/meson.build +13 -0
- just_buildit-0.3.11/examples/meson/meson_options.txt +3 -0
- just_buildit-0.3.11/examples/meson/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/meson/src/add.c +29 -0
- just_buildit-0.3.11/examples/mingw/Makefile +15 -0
- just_buildit-0.3.11/examples/mingw/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/mingw/src/add/add.c +29 -0
- just_buildit-0.3.11/examples/mixed/Makefile +15 -0
- just_buildit-0.3.11/examples/mixed/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/mixed/src/calc/__init__.py +8 -0
- just_buildit-0.3.11/examples/mixed/src/calc/_core.c +40 -0
- just_buildit-0.3.11/examples/nested/Makefile +27 -0
- just_buildit-0.3.11/examples/nested/pyproject.toml +13 -0
- just_buildit-0.3.11/examples/nested/src/imagelib/__init__.py +4 -0
- just_buildit-0.3.11/examples/nested/src/imagelib/codec/__init__.py +3 -0
- just_buildit-0.3.11/examples/nested/src/imagelib/codec/_encode.c +29 -0
- just_buildit-0.3.11/examples/nested/src/imagelib/filters/__init__.py +3 -0
- just_buildit-0.3.11/examples/nested/src/imagelib/filters/_blur.c +29 -0
- just_buildit-0.3.11/pyproject.toml +140 -0
- just_buildit-0.3.11/scripts/release-watch.sh +284 -0
- just_buildit-0.3.11/src/just_buildit/__init__.py +213 -0
- just_buildit-0.3.11/src/just_buildit/_build.py +387 -0
- just_buildit-0.3.11/src/just_buildit/_cli.py +176 -0
- just_buildit-0.3.11/src/just_buildit/_meta.py +222 -0
- just_buildit-0.3.11/src/just_buildit/_sdist.py +116 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/README.md +15 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/__init__.py +0 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/tomli/LICENSE +21 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/tomli/__init__.py +11 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/tomli/_parser.py +691 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/tomli/_re.py +107 -0
- just_buildit-0.3.11/src/just_buildit/_vendor/tomli/_types.py +10 -0
- just_buildit-0.3.11/src/just_buildit/_wheel.py +352 -0
- just_buildit-0.3.11/standard.mk +1435 -0
- just_buildit-0.3.11/tests/fixture/Makefile +28 -0
- just_buildit-0.3.11/tests/fixture/README.md +5 -0
- just_buildit-0.3.11/tests/fixture/pyproject.toml +14 -0
- just_buildit-0.3.11/tests/fixture/src/hello/hello.c +36 -0
- just_buildit-0.3.11/tests/fixture_noconfig/pyproject.toml +12 -0
- just_buildit-0.3.11/tests/fixture_noconfig/src/hello/hello.c +36 -0
- just_buildit-0.3.11/tests/fixture_pure/pyproject.toml +17 -0
- just_buildit-0.3.11/tests/fixture_pure/src/purepkg/__init__.py +9 -0
- just_buildit-0.3.11/tests/fixture_pure/src/purepkg/sample.c +4 -0
- just_buildit-0.3.11/tests/test_build.py +536 -0
- just_buildit-0.3.11/tests/test_cli.py +161 -0
- just_buildit-0.3.11/tests/test_examples.py +431 -0
- just_buildit-0.3.11/tests/test_examples_target_interpreter.py +140 -0
- just_buildit-0.3.11/tests/test_metadata.py +438 -0
- just_buildit-0.3.11/tests/test_pypi.py +134 -0
- just_buildit-0.3.11/uv.lock +795 -0
- just_buildit-0.3.11/zensical.toml +75 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
# Force uv to use managed (python-build-standalone) interpreters. Under
|
|
9
|
+
# setup-uv@v8, `uv run -p X` on macOS would otherwise select the Xcode system
|
|
10
|
+
# Python, whose headers aren't where the build looks (no Python.h) — the
|
|
11
|
+
# managed builds ship the headers we compile against.
|
|
12
|
+
env:
|
|
13
|
+
UV_PYTHON_PREFERENCE: only-managed
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
# There was no lint job at all before this. Every pre-commit hook, every
|
|
17
|
+
# drift gate and every check in `make lint` ran on NO pull request -- which
|
|
18
|
+
# is worse than not having them, because the repo reads as gated.
|
|
19
|
+
#
|
|
20
|
+
# `make lint` and nothing else: the Makefile is the SSOT for how each tool
|
|
21
|
+
# runs, so a job that re-listed the tools here would be a second copy free to
|
|
22
|
+
# drift -- which is exactly what happened to the test command, where ci.yml
|
|
23
|
+
# passed `--with pip --with numpy` and the Makefile did not, so `make test`
|
|
24
|
+
# could not pass while CI was green.
|
|
25
|
+
lint:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6.0.2
|
|
29
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
- run: make lint
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
runs-on: ${{ matrix.os }}
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
|
|
39
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v6.0.2
|
|
42
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
43
|
+
with:
|
|
44
|
+
python-version: ${{ matrix.python-version }}
|
|
45
|
+
- name: Install meson + ninja (Linux)
|
|
46
|
+
if: runner.os == 'Linux'
|
|
47
|
+
run: sudo apt-get install -y ninja-build && uv tool install meson
|
|
48
|
+
- name: Install meson + ninja (macOS)
|
|
49
|
+
if: runner.os == 'macOS'
|
|
50
|
+
run: brew install ninja && uv tool install meson
|
|
51
|
+
- run: make test TEST_PYTHON=${{ matrix.python-version }}
|
|
52
|
+
|
|
53
|
+
test-bazel:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
strategy:
|
|
56
|
+
matrix:
|
|
57
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v6.0.2
|
|
60
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
61
|
+
with:
|
|
62
|
+
python-version: ${{ matrix.python-version }}
|
|
63
|
+
- run: sudo apt-get update && sudo apt-get install -y bazel-bootstrap && sudo ln -sf /usr/bin/bazel-bootstrap /usr/local/bin/bazel
|
|
64
|
+
- run: uv run --no-project -p ${{ matrix.python-version }} python -m unittest tests.test_examples.TestBazelExample -v
|
|
65
|
+
|
|
66
|
+
test-just-makeit:
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
strategy:
|
|
69
|
+
matrix:
|
|
70
|
+
# just-makeit (the scaffolding CLI) requires Python >=3.11 and its
|
|
71
|
+
# generated projects target >=3.11, so this integration only runs on
|
|
72
|
+
# 3.11+. just-buildit's 3.8+ floor is covered by the test/test-bazel
|
|
73
|
+
# jobs above.
|
|
74
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v6.0.2
|
|
77
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
78
|
+
with:
|
|
79
|
+
python-version: ${{ matrix.python-version }}
|
|
80
|
+
- run: uv tool install just-makeit
|
|
81
|
+
- run: uv run --no-project -p ${{ matrix.python-version }} --with pip --with numpy python -m unittest tests.test_examples.TestJustMakeitExample -v
|
|
82
|
+
|
|
83
|
+
test-windows-ucrt64:
|
|
84
|
+
runs-on: windows-latest
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v6.0.2
|
|
87
|
+
- uses: msys2/setup-msys2@v2
|
|
88
|
+
with:
|
|
89
|
+
msystem: UCRT64
|
|
90
|
+
install: >-
|
|
91
|
+
mingw-w64-ucrt-x86_64-python
|
|
92
|
+
mingw-w64-ucrt-x86_64-gcc
|
|
93
|
+
mingw-w64-ucrt-x86_64-cmake
|
|
94
|
+
make
|
|
95
|
+
update: true
|
|
96
|
+
- shell: msys2 {0}
|
|
97
|
+
run: python -m unittest tests.test_build tests.test_examples tests.test_cli -v
|
|
98
|
+
|
|
99
|
+
# The one check main's ruleset requires -- and it did not exist. The rule
|
|
100
|
+
# named `CI passed`, no job produced it, so `mergeable_state` was `blocked`
|
|
101
|
+
# on every pull request with every check green. A required check that nothing
|
|
102
|
+
# reports is not a strict gate; it is a repository that cannot merge, and it
|
|
103
|
+
# reads as ordinary CI slowness until someone looks at the ruleset.
|
|
104
|
+
#
|
|
105
|
+
# `if: always()` with an explicit failure scan rather than plain `needs:`,
|
|
106
|
+
# so a SKIPPED job does not read as a failure and a failed one cannot be
|
|
107
|
+
# skipped past.
|
|
108
|
+
ci-passed:
|
|
109
|
+
name: CI passed
|
|
110
|
+
runs-on: ubuntu-latest
|
|
111
|
+
timeout-minutes: 10
|
|
112
|
+
needs:
|
|
113
|
+
[lint, test, test-bazel, test-just-makeit, test-windows-ucrt64]
|
|
114
|
+
if: always()
|
|
115
|
+
steps:
|
|
116
|
+
- run: |
|
|
117
|
+
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
|
|
118
|
+
exit 1
|
|
119
|
+
fi
|
|
120
|
+
if [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
|
121
|
+
exit 1
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
trigger-mirror:
|
|
125
|
+
name: Trigger docs mirror refresh
|
|
126
|
+
# Nudges just-buildit.github.io's mirror.yml (repository_dispatch:
|
|
127
|
+
# mirror) to refresh immediately instead of waiting for its daily cron.
|
|
128
|
+
# Never blocks anything else in this repo — not a required check.
|
|
129
|
+
#
|
|
130
|
+
# Hangs off `ci-passed` rather than re-listing the matrix. The comment
|
|
131
|
+
# here used to say no aggregator existed "unlike just-bashit/just-makeit"
|
|
132
|
+
# — which was true, and was also why main's ruleset required a check
|
|
133
|
+
# nothing produced and no pull request could merge.
|
|
134
|
+
needs: ci-passed
|
|
135
|
+
runs-on: ubuntu-latest
|
|
136
|
+
if: |
|
|
137
|
+
github.event_name == 'push' && github.ref == 'refs/heads/main' &&
|
|
138
|
+
!contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
|
139
|
+
steps:
|
|
140
|
+
- name: Dispatch mirror refresh
|
|
141
|
+
env:
|
|
142
|
+
GH_TOKEN: ${{ secrets.MIRROR_DISPATCH_TOKEN }}
|
|
143
|
+
run: |
|
|
144
|
+
gh api repos/just-buildit/just-buildit.github.io/dispatches \
|
|
145
|
+
-f event_type=mirror
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
11
|
+
|
|
12
|
+
# Only one deploy at a time; don't cancel in-progress deploys.
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
# ------------------------------------------------------------------
|
|
19
|
+
# Build — runs on every push and PR
|
|
20
|
+
# ------------------------------------------------------------------
|
|
21
|
+
build:
|
|
22
|
+
name: Build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6.0.2
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.12'
|
|
31
|
+
|
|
32
|
+
- name: Install deps
|
|
33
|
+
run: PYTHONPATH=src uv sync --group dev --no-build-isolation
|
|
34
|
+
|
|
35
|
+
- name: Build Zensical site
|
|
36
|
+
run: uv run zensical build --clean
|
|
37
|
+
|
|
38
|
+
- name: Configure Pages
|
|
39
|
+
if: github.ref == 'refs/heads/main'
|
|
40
|
+
uses: actions/configure-pages@v5
|
|
41
|
+
|
|
42
|
+
- name: Upload pages artifact
|
|
43
|
+
if: github.ref == 'refs/heads/main'
|
|
44
|
+
uses: actions/upload-pages-artifact@v3
|
|
45
|
+
with:
|
|
46
|
+
path: site/
|
|
47
|
+
|
|
48
|
+
# ------------------------------------------------------------------
|
|
49
|
+
# Deploy — only on push to main
|
|
50
|
+
# ------------------------------------------------------------------
|
|
51
|
+
deploy:
|
|
52
|
+
name: Deploy
|
|
53
|
+
if: github.ref == 'refs/heads/main'
|
|
54
|
+
needs: build
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
permissions:
|
|
57
|
+
pages: write
|
|
58
|
+
id-token: write
|
|
59
|
+
environment:
|
|
60
|
+
name: github-pages
|
|
61
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
62
|
+
steps:
|
|
63
|
+
- name: Deploy to GitHub Pages
|
|
64
|
+
id: deployment
|
|
65
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
# Manual dry-run: runs the full test + build matrix (incl. macOS) WITHOUT
|
|
8
|
+
# publishing, so a release can be verified before tagging. The publish job
|
|
9
|
+
# is gated to tag pushes only (see its `if:` below).
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
# Force uv to use managed interpreters (see ci.yml for the macOS/setup-uv@v8
|
|
13
|
+
# rationale — the Xcode system Python lacks the headers we build against).
|
|
14
|
+
env:
|
|
15
|
+
UV_PYTHON_PREFERENCE: only-managed
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ${{ matrix.os }}
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
|
|
23
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6.0.2
|
|
26
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
- run: uv run --no-project -p ${{ matrix.python-version }} python -m unittest tests.test_build tests.test_examples tests.test_cli tests.test_metadata -v
|
|
30
|
+
|
|
31
|
+
test-windows-ucrt64:
|
|
32
|
+
runs-on: windows-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v6.0.2
|
|
35
|
+
- uses: msys2/setup-msys2@v2
|
|
36
|
+
with:
|
|
37
|
+
msystem: UCRT64
|
|
38
|
+
install: >-
|
|
39
|
+
mingw-w64-ucrt-x86_64-python
|
|
40
|
+
mingw-w64-ucrt-x86_64-gcc
|
|
41
|
+
mingw-w64-ucrt-x86_64-cmake
|
|
42
|
+
make
|
|
43
|
+
update: true
|
|
44
|
+
- shell: msys2 {0}
|
|
45
|
+
run: python -m unittest tests.test_build tests.test_examples -v
|
|
46
|
+
|
|
47
|
+
test-bazel:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
strategy:
|
|
50
|
+
matrix:
|
|
51
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v6.0.2
|
|
54
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
55
|
+
with:
|
|
56
|
+
python-version: ${{ matrix.python-version }}
|
|
57
|
+
- run: sudo apt-get update && sudo apt-get install -y bazel-bootstrap && sudo ln -sf /usr/bin/bazel-bootstrap /usr/local/bin/bazel
|
|
58
|
+
- run: uv run --no-project -p ${{ matrix.python-version }} python -m unittest tests.test_examples.TestBazelExample -v
|
|
59
|
+
|
|
60
|
+
build:
|
|
61
|
+
needs: [test, test-bazel, test-windows-ucrt64]
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v6.0.2
|
|
65
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
66
|
+
with:
|
|
67
|
+
python-version: "3.11"
|
|
68
|
+
- run: PYTHONPATH=src uv build --wheel --no-build-isolation --python 3.11
|
|
69
|
+
# The sdist is what carries everything outside src/ -- examples above
|
|
70
|
+
# all. Publishing only the wheel made repo-level work unreachable from
|
|
71
|
+
# PyPI at every version (#19).
|
|
72
|
+
- run: PYTHONPATH=src uv build --sdist --no-build-isolation --python 3.11
|
|
73
|
+
- uses: actions/upload-artifact@v7.0.1
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
|
|
78
|
+
smoke:
|
|
79
|
+
name: Smoke test the wheel and the sdist
|
|
80
|
+
needs: build
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/download-artifact@v8.0.1
|
|
84
|
+
with:
|
|
85
|
+
name: dist
|
|
86
|
+
path: dist/
|
|
87
|
+
|
|
88
|
+
- uses: astral-sh/setup-uv@v8.1.0
|
|
89
|
+
with:
|
|
90
|
+
python-version: "3.12"
|
|
91
|
+
|
|
92
|
+
- name: Install the built wheel into a fresh venv
|
|
93
|
+
run: |
|
|
94
|
+
wheel="$(ls dist/*.whl)"
|
|
95
|
+
uv venv .smoke
|
|
96
|
+
uv pip install --python .smoke "$wheel"
|
|
97
|
+
|
|
98
|
+
- name: Version matches the tag
|
|
99
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
100
|
+
run: |
|
|
101
|
+
source .smoke/bin/activate
|
|
102
|
+
pkg_ver="$(python -c 'from importlib.metadata import version; print(version("just-buildit"))')"
|
|
103
|
+
want="${GITHUB_REF_NAME#v}"
|
|
104
|
+
if [ "$pkg_ver" != "$want" ]; then
|
|
105
|
+
echo "::error::version mismatch (want $want, got $pkg_ver)"; exit 1
|
|
106
|
+
fi
|
|
107
|
+
echo "Version OK: $pkg_ver"
|
|
108
|
+
|
|
109
|
+
- name: CLI smoke (inspect + build)
|
|
110
|
+
run: |
|
|
111
|
+
source .smoke/bin/activate
|
|
112
|
+
just-buildit --help
|
|
113
|
+
|
|
114
|
+
# An sdist that is published but never installed is an unchecked
|
|
115
|
+
# artifact. Both halves matter: that it CONTAINS the tree, and that it
|
|
116
|
+
# BUILDS from it.
|
|
117
|
+
- name: The sdist carries the repo tree, not just the package
|
|
118
|
+
run: |
|
|
119
|
+
sdist="$(ls dist/*.tar.gz)"
|
|
120
|
+
echo "inspecting $sdist"
|
|
121
|
+
n_examples="$(tar tzf "$sdist" | grep -c '/examples/' || true)"
|
|
122
|
+
echo "entries under examples/: $n_examples"
|
|
123
|
+
if [ "$n_examples" -eq 0 ]; then
|
|
124
|
+
echo "::error::sdist carries no examples/ -- see #19"; exit 1
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
- name: The sdist builds
|
|
128
|
+
run: |
|
|
129
|
+
sdist="$(ls dist/*.tar.gz)"
|
|
130
|
+
uv venv .sdist-smoke
|
|
131
|
+
uv pip install --python .sdist-smoke "$sdist"
|
|
132
|
+
.sdist-smoke/bin/python -c 'import just_buildit; print(just_buildit.__name__, "ok")'
|
|
133
|
+
|
|
134
|
+
publish:
|
|
135
|
+
needs: smoke
|
|
136
|
+
# Only ever publish for a real version tag — never on a manual dry-run.
|
|
137
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
environment: pypi
|
|
140
|
+
permissions:
|
|
141
|
+
id-token: write
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/download-artifact@v8.0.1
|
|
144
|
+
with:
|
|
145
|
+
name: dist
|
|
146
|
+
path: dist/
|
|
147
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
148
|
+
|
|
149
|
+
github-release:
|
|
150
|
+
needs: publish
|
|
151
|
+
runs-on: ubuntu-latest
|
|
152
|
+
permissions:
|
|
153
|
+
contents: write
|
|
154
|
+
steps:
|
|
155
|
+
- uses: actions/checkout@v6.0.2
|
|
156
|
+
|
|
157
|
+
- name: Extract changelog section for this tag
|
|
158
|
+
run: |
|
|
159
|
+
TAG="${GITHUB_REF_NAME}"
|
|
160
|
+
VER="${TAG#v}"
|
|
161
|
+
awk -v ver="$VER" \
|
|
162
|
+
'index($0, "## [" ver "]") == 1 {found=1; next}
|
|
163
|
+
found && /^## / {exit}
|
|
164
|
+
found {print}' CHANGELOG.md > release-notes.md
|
|
165
|
+
cat release-notes.md
|
|
166
|
+
|
|
167
|
+
- name: Create GitHub Release
|
|
168
|
+
env:
|
|
169
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
170
|
+
run: |
|
|
171
|
+
gh release create "${GITHUB_REF_NAME}" \
|
|
172
|
+
--title "${GITHUB_REF_NAME}" \
|
|
173
|
+
--latest \
|
|
174
|
+
--notes-file release-notes.md
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# uv init artifacts
|
|
13
|
+
main.py
|
|
14
|
+
*.zip
|
|
15
|
+
|
|
16
|
+
# Example build artifacts
|
|
17
|
+
examples/**/_build/
|
|
18
|
+
examples/bazel/bazel-*
|
|
19
|
+
|
|
20
|
+
# Test fixture build output
|
|
21
|
+
tests/fixture/dist/
|
|
22
|
+
|
|
23
|
+
# Zensical build output
|
|
24
|
+
site/
|
|
25
|
+
|
|
26
|
+
# Editor config. Deliberately not tracked: VS Code writes machine-specific
|
|
27
|
+
# absolute paths into it (cmake.sourceDirectory pointed at one machine's
|
|
28
|
+
# $HOME for the life of the file). See #16.
|
|
29
|
+
.vscode/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# python-only = canonical base + Python (ruff). See
|
|
2
|
+
# ~/mcp-store/configs/.pre-commit-config.yaml for the shared base this
|
|
3
|
+
# extends. ruff settings live in [tool.ruff] in pyproject.toml (not a
|
|
4
|
+
# standalone ruff.toml). mypy is configured in [tool.mypy] for manual/CI
|
|
5
|
+
# use but intentionally not wired in here — matching sibling projects
|
|
6
|
+
# (doppler, just-makeit), which also run mypy outside of pre-commit.
|
|
7
|
+
#
|
|
8
|
+
# src/just_buildit/_vendor/ is a vendored MIT-licensed tomli backport and
|
|
9
|
+
# is excluded everywhere below — left byte-for-byte as upstream ships it.
|
|
10
|
+
exclude: ^src/just_buildit/_vendor/
|
|
11
|
+
|
|
12
|
+
repos:
|
|
13
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
14
|
+
rev: v6.0.0
|
|
15
|
+
hooks:
|
|
16
|
+
- id: check-yaml
|
|
17
|
+
- id: check-toml
|
|
18
|
+
- id: check-merge-conflict
|
|
19
|
+
- id: check-added-large-files
|
|
20
|
+
args: [--maxkb=500]
|
|
21
|
+
- id: end-of-file-fixer
|
|
22
|
+
- id: trailing-whitespace
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
25
|
+
rev: 0.11.28
|
|
26
|
+
hooks:
|
|
27
|
+
- id: uv-lock
|
|
28
|
+
|
|
29
|
+
# Dispatches inward so a hook cannot format differently from `make format`.
|
|
30
|
+
# Versions come from pyproject.toml's dev group via uv.lock, so there is no
|
|
31
|
+
# `rev:` and no additional_dependencies list to drift. Paths and exclusions
|
|
32
|
+
# live in the Makefile, which is the SSOT for HOW every tool runs.
|
|
33
|
+
- repo: local
|
|
34
|
+
hooks:
|
|
35
|
+
- id: ruff
|
|
36
|
+
name: ruff
|
|
37
|
+
entry: make -s lint-ruff
|
|
38
|
+
language: system
|
|
39
|
+
types: [python]
|
|
40
|
+
pass_filenames: false
|
|
41
|
+
- id: ruff-format
|
|
42
|
+
name: ruff format
|
|
43
|
+
entry: make -s lint-ruff-format
|
|
44
|
+
language: system
|
|
45
|
+
types: [python]
|
|
46
|
+
pass_filenames: false
|
|
47
|
+
- id: mdformat
|
|
48
|
+
name: mdformat
|
|
49
|
+
entry: make -s lint-mdformat
|
|
50
|
+
language: system
|
|
51
|
+
types: [markdown]
|
|
52
|
+
pass_filenames: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|