Skip to content

Commit 4f23417

Browse files
authored
Merge pull request #109 from python-project-templates/tkp/fix-generated-ci
fix: remove bash -c from build:cpp for Windows compat
2 parents 0311541 + 6b5f645 commit 4f23417

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

cpp/pyproject.toml.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ test-command = "echo 'TODO'"
9292
test-extras = "develop"
9393
9494
[tool.cibuildwheel.linux]
95+
manylinux-x86_64-image = "manylinux_2_28"
9596
skip = "*i686 musllinux*"
9697
9798
[tool.cibuildwheel.macos]

cppjswasm/Makefile.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#########
22
# BUILD #
33
#########
4-
EMSDK_ENV := $(shell pwd)/emsdk/emsdk_env.sh
5-
ACTIVATE_EMSDK := if [ -f "$(EMSDK_ENV)" ]; then . "$(EMSDK_ENV)" 2>/dev/null; fi
4+
EMSDK_DIR := $(shell pwd)/emsdk
5+
ACTIVATE_EMSDK := if [ -d "$(EMSDK_DIR)/upstream/emscripten" ]; then export PATH="$(EMSDK_DIR):$(EMSDK_DIR)/upstream/emscripten:$$PATH"; fi
66

77
.PHONY: develop-py develop-js develop-cpp develop
88
develop-py:

cppjswasm/js/package.json.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"access": "public"
2727
},
2828
"scripts": {
29-
"build:cpp": "bash -c 'if [ -f ../emsdk/emsdk_env.sh ]; then source ../emsdk/emsdk_env.sh 2>/dev/null; fi && mkdir -p dist/pkg && em++ -O2 -std=c++17 -s WASM=1 -s MODULARIZE=1 -s EXPORT_ES6=1 -s SINGLE_FILE=1 -s ALLOW_MEMORY_GROWTH=1 -s ENVIRONMENT=web,worker --bind -I ../cpp ../cpp/{{project_name_formatted}}/example.cpp src/cpp/bindings.cpp -o dist/pkg/{{module}}.js'",
29+
"build:cpp": "node -e \"require('fs').mkdirSync('dist/pkg',{recursive:true})\" && em++ -O2 -std=c++17 -s WASM=1 -s MODULARIZE=1 -s EXPORT_ES6=1 -s SINGLE_FILE=1 -s ALLOW_MEMORY_GROWTH=1 -s ENVIRONMENT=web,worker --bind -I ../cpp ../cpp/{{project_name_formatted}}/example.cpp src/cpp/bindings.cpp -o dist/pkg/{{module}}.js",
3030
"build:debug": "node build.mjs --debug",
3131
"build:prod": "node build.mjs",
3232
"build": "npm-run-all build:cpp build:prod",

cppjswasm/pyproject.toml.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
33
"hatchling",
4-
"hatch-cpp",
4+
"hatch-cpp<0.3",
55
"hatch-js",
66
"pybind11",
77
]
@@ -42,7 +42,7 @@ develop = [
4242
"check-manifest",
4343
"cibuildwheel",
4444
"codespell>=2.4,<2.5",
45-
"hatch-cpp",
45+
"hatch-cpp<0.3",
4646
"hatch-js",
4747
"hatchling",
4848
"mdformat>=0.7.22,<1.1",

0 commit comments

Comments
 (0)