File tree Expand file tree Collapse file tree 4 files changed +13
-19
lines changed
Expand file tree Collapse file tree 4 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 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
44add_docs : true
55add_extension : cppjswasm
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11import { bundle } from "./tools/bundle.mjs" ;
22import { bundle_css } from "./tools/css.mjs" ;
33import { node_modules_external } from "./tools/externals.mjs" ;
4- import { getarg } from "./tools/getarg.mjs" ;
54
6- import { transform } from "lightningcss" ;
75import fs from "fs" ;
86import 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
4240build ( ) ;
Original file line number Diff line number Diff 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
4242export const bundle_css = async ( root = "src/css/index.css" , resolver = null ) => {
You can’t perform that action at this time.
0 commit comments