Skip to content

Commit 0afb4a4

Browse files
Update from Copier (2026-08-16T19-38-09Z) (#126)
Signed-off-by: python-templates-copier-update[bot] <python-templates-copier-update[bot]@users.noreply.github.com> Co-authored-by: python-templates-copier-update[bot] <python-templates-copier-update[bot]@users.noreply.github.com>
1 parent 1e62e8c commit 0afb4a4

5 files changed

Lines changed: 37 additions & 22 deletions

File tree

.copier-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: cb37079
2+
_commit: d814faa
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: rustjswasm

.github/workflows/build.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
strategy:
3131
matrix:
32-
os: [ubuntu-latest, macos-latest, windows-latest]
32+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
3333

3434
steps:
3535
- name: Checkout
@@ -85,29 +85,35 @@ jobs:
8585
with:
8686
token: ${{ secrets.CODECOV_TOKEN }}
8787

88-
- name: Set up QEMU
89-
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
90-
with:
91-
platforms: all
92-
if: runner.os == 'Linux' && runner.arch == 'X64'
93-
9488
- name: Free disk space
9589
run: |
9690
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/share/swift
9791
df -h /
9892
shell: bash
99-
if: matrix.os == 'ubuntu-latest'
93+
if: runner.os == 'Linux'
10094

101-
- name: Build distributions (Linux)
95+
- name: Build distributions (Linux x86_64)
10296
run: |
10397
rm -rf dist
10498
make dist-rs
10599
make dist-py-sdist
106100
make dist-py-wheel
107101
make dist-check
108102
shell: bash
103+
env:
104+
CIBW_ARCHS_LINUX: native
109105
if: matrix.os == 'ubuntu-latest'
110106

107+
- name: Build distributions (Linux ARM64)
108+
run: |
109+
rm -rf dist
110+
make dist-py-wheel
111+
make dist-check
112+
shell: bash
113+
env:
114+
CIBW_ARCHS_LINUX: native
115+
if: matrix.os == 'ubuntu-24.04-arm'
116+
111117
- name: Build distributions (macOS/Windows)
112118
run: |
113119
rm -rf dist
@@ -116,13 +122,13 @@ jobs:
116122
shell: bash
117123
env:
118124
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
119-
if: matrix.os != 'ubuntu-latest'
125+
if: runner.os != 'Linux'
120126

121127
- name: Test wheel
122128
uses: actions-ext/python/test-wheel@6e1b91a408ea89f49bc8aff8724f83826f7b5446
123129
with:
124130
module: python_template_rust
125-
if: matrix.os == 'ubuntu-latest'
131+
if: runner.os == 'Linux'
126132

127133
- name: Test source distribution
128134
uses: actions-ext/python/test-sdist@6e1b91a408ea89f49bc8aff8724f83826f7b5446

js/build.mjs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ const BUNDLES = [
1818
];
1919

2020
async function build() {
21+
if (fs.existsSync("dist")) {
22+
for (const entry of fs.readdirSync("dist")) {
23+
if (entry !== "pkg") {
24+
fs.rmSync(`dist/${entry}`, { recursive: true, force: true });
25+
}
26+
}
27+
}
28+
fs.rmSync("../python_template_rust/extension", {
29+
recursive: true,
30+
force: true,
31+
});
32+
2133
// Bundle css
2234
await bundle_css();
2335

@@ -33,10 +45,6 @@ async function build() {
3345
await Promise.all(BUNDLES.map(bundle)).catch(() => process.exit(1));
3446

3547
// Copy servable assets to python extension (exclude esm/)
36-
fs.rmSync("../python_template_rust/extension", {
37-
recursive: true,
38-
force: true,
39-
});
4048
fs.mkdirSync("../python_template_rust/extension", { recursive: true });
4149
await cpy("dist/**/*", "../python_template_rust/extension", {
4250
filter: (file) =>
@@ -45,4 +53,4 @@ async function build() {
4553
});
4654
}
4755

48-
build();
56+
await build();

js/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@
1818
"./package.json": "./package.json"
1919
},
2020
"files": [
21-
"dist/**/*",
22-
"index.d.ts"
21+
"dist/**/*"
2322
],
2423
"types": "./dist/esm/index.d.ts",
2524
"publishConfig": {
2625
"access": "public"
2726
},
2827
"scripts": {
2928
"setup": "cargo install -f wasm-bindgen-cli --version 0.2.126 --locked",
29+
"build:clean": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('../python_template_rust/extension',{recursive:true,force:true})\"",
3030
"build:debug": "node build.mjs --debug",
3131
"build:rust": "cargo build --release --all-features --target wasm32-unknown-unknown --target-dir ../target",
3232
"build:wasm-bindgen": "wasm-bindgen ../target/wasm32-unknown-unknown/release/python_template_rust.wasm --out-dir ./dist/pkg --target web",
3333
"build:prod": "node build.mjs",
34-
"build": "npm-run-all build:rust build:wasm-bindgen build:prod",
34+
"build:types": "tsc",
35+
"build": "npm-run-all build:clean build:rust build:wasm-bindgen build:prod build:types",
3536
"clean": "rm -rf dist lib playwright-report ../python_template_rust/extension",
3637
"dev": "npm-run-all -p start watch",
3738
"lint:js": "oxlint . && oxfmt --check \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",

js/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"noFallthroughCasesInSwitch": true,
1515
"outDir": "./dist/esm",
1616
"resolveJsonModule": true,
17-
"rootDir": ".",
17+
"rootDir": "./src/ts",
1818
"skipLibCheck": true,
1919
"strict": true,
2020
"target": "ES2020",
2121
"useDefineForClassFields": true
2222
},
23-
"include": ["./src/ts/*.ts", "./tests/*.ts"]
23+
"include": ["./src/ts/*.ts"]
2424
}

0 commit comments

Comments
 (0)