Skip to content

Commit 8387315

Browse files
add pyodide (#4)
* sync code * update header * update emscripten * fix * fix * fix --------- Co-authored-by: tang zhixiong <[email protected]>
1 parent 2050715 commit 8387315

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.github/workflows/enscripten.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: WASM
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-wasm-emscripten:
15+
name: Pyodide
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: true
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- uses: pypa/[email protected]
28+
env:
29+
CIBW_PLATFORM: pyodide
30+
CIBW_TEST_SKIP: "*"
31+
32+
- uses: actions/upload-artifact@v4
33+
with:
34+
path: dist/*.whl

Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ tar.gz:
100100
tar -cvz --exclude .git -f ../$(PROJECT_NAME).tar.gz .
101101
ls -alh ../$(PROJECT_NAME).tar.gz
102102

103+
104+
SYNC_OUTPUT_DIR ?= headers/include/cubao
105+
sync_headers:
106+
mkdir -p $(SYNC_OUTPUT_DIR)
107+
cp src/naive_svg.hpp $(SYNC_OUTPUT_DIR)
108+
cp src/pybind11_naive_svg.cpp $(SYNC_OUTPUT_DIR)/pybind11_naive_svg.hpp
109+
103110
# https://stackoverflow.com/a/25817631
104111
echo-% : ; @echo -n $($*)
105112
Echo-% : ; @echo $($*)

headers

Submodule headers updated 815 files

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
55

66
[project]
77
name = "naive_svg"
8-
version = "0.0.3"
8+
version = "0.0.4"
99
url = "https://github.com/cubao/pybind11-naive-svg"
1010
description="naive svg writer"
1111
readme = "README.md"

0 commit comments

Comments
 (0)