Skip to content

Commit d8df2d8

Browse files
authored
Merge pull request #29 from python-project-templates/copier-update-2026-04-12T19-44-19
Update from copier (2026-04-12T19:44:19)
2 parents a589e38 + 8582853 commit d8df2d8

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

.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: fdea3fe
2+
_commit: 41c2f2c
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: cppjswasm

.github/workflows/build.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,14 @@ jobs:
121121
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
122122
if: matrix.os == 'windows-latest'
123123

124-
- name: Test wheel install
125-
run: |
126-
python -m venv /tmp/test-wheel
127-
/tmp/test-wheel/bin/pip install dist/*.whl
128-
/tmp/test-wheel/bin/python -c "import python_template_cppjswasm"
124+
- uses: actions-ext/python/test-wheel@main
125+
with:
126+
module: python_template_cppjswasm
129127
if: matrix.os == 'ubuntu-latest'
130128

131-
- name: Test sdist install
132-
run: |
133-
python -m venv /tmp/test-sdist
134-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
135-
/tmp/test-sdist/bin/python -c "import python_template_cppjswasm"
129+
- uses: actions-ext/python/test-sdist@main
130+
with:
131+
module: python_template_cppjswasm
136132
if: matrix.os == 'ubuntu-latest'
137133

138134
- uses: actions/upload-artifact@v7

js/build.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { bundle } from "./tools/bundle.mjs";
22
import { bundle_css } from "./tools/css.mjs";
33
import { node_modules_external } from "./tools/externals.mjs";
4-
import { getarg } from "./tools/getarg.mjs";
54

6-
import { transform } from "lightningcss";
75
import fs from "fs";
86
import cpy from "cpy";
97

@@ -24,8 +22,6 @@ async function build() {
2422
await bundle_css();
2523

2624
// Copy HTML
27-
fs.mkdirSync("dist/html", { recursive: true });
28-
cpy("src/html/*", "dist/html");
2925
cpy("src/html/*", "dist/");
3026

3127
// Copy images
@@ -34,9 +30,11 @@ async function build() {
3430

3531
await Promise.all(BUNDLES.map(bundle)).catch(() => process.exit(1));
3632

37-
// Copy from dist to python
33+
// Copy servable assets to python extension (exclude esm/)
3834
fs.mkdirSync("../python_template_cppjswasm/extension", { recursive: true });
39-
cpy("dist/**/*", "../python_template_cppjswasm/extension");
35+
cpy("dist/**/*", "../python_template_cppjswasm/extension", {
36+
filter: (file) => !file.relativePath.startsWith("esm"),
37+
});
4038
}
4139

4240
build();

js/tools/css.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const bundle_one = async (file, resolver) => {
3535
resolver: resolver || DEFAULT_RESOLVER,
3636
});
3737
const outName = path.basename(file);
38-
fs.mkdirSync("./dist", { recursive: true });
39-
fs.writeFileSync(path.join("./dist", outName), code);
38+
fs.mkdirSync("./dist/css", { recursive: true });
39+
fs.writeFileSync(path.join("./dist/css", outName), code);
4040
};
4141

4242
export const bundle_css = async (root = "src/css/index.css", resolver = null) => {

0 commit comments

Comments
 (0)