Skip to content

Commit f8e9c06

Browse files
authored
Merge pull request #83 from vkottler/dev/wasm
Initial sync.
2 parents 6611c46 + fa23d24 commit f8e9c06

File tree

21 files changed

+220
-91
lines changed

21 files changed

+220
-91
lines changed

.github/workflows/python-package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
matrix:
2020
python-version:
2121
- "3.11"
22+
- "3.12"
2223
system:
2324
- ubuntu-latest
2425
- macos-latest
@@ -54,6 +55,10 @@ jobs:
5455
if: matrix.system == 'ubuntu-latest'
5556
- run: sudo apt-get install gcc-13 g++-13 clang-17 clang-format-17
5657
if: matrix.system == 'ubuntu-latest'
58+
- run: sudo apt-get install emscripten
59+
if: matrix.system == 'ubuntu-latest'
60+
- run: em++ --version
61+
if: matrix.system == 'ubuntu-latest'
5762
# End project-specific setup.
5863

5964
- run: mk python-sa-types
@@ -72,7 +77,7 @@ jobs:
7277
env:
7378
PY_TEST_EXTRA_ARGS: --cov-report=xml
7479

75-
- uses: codecov/codecov-action@v3
80+
- uses: codecov/codecov-action@v3.1.5
7681

7782
- run: mk pypi-upload-ci
7883
env:
@@ -85,7 +90,7 @@ jobs:
8590
8691
- run: |
8792
mk python-release owner=vkottler \
88-
repo=yambs version=2.8.1
93+
repo=yambs version=3.0.0
8994
if: |
9095
matrix.python-version == '3.11'
9196
&& matrix.system == 'ubuntu-latest'

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
=====================================
33
generator=datazen
44
version=3.1.4
5-
hash=4976235943725fd73fdb02c40af8f1cb
5+
hash=807e0a42a738120cbe4629477dbbafe5
66
=====================================
77
-->
88

9-
# yambs ([2.8.1](https://pypi.org/project/yambs/))
9+
# yambs ([3.0.0](https://pypi.org/project/yambs/))
1010

1111
[![python](https://img.shields.io/pypi/pyversions/yambs.svg)](https://pypi.org/project/yambs/)
1212
![Build Status](https://github.com/vkottler/yambs/workflows/Python%20Package/badge.svg)
@@ -30,6 +30,7 @@
3030
This package is tested with the following Python minor versions:
3131

3232
* [`python3.11`](https://docs.python.org/3.11/)
33+
* [`python3.12`](https://docs.python.org/3.12/)
3334

3435
## Platform Support
3536

local/configs/package.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ci_local:
1414
- "- run: mk python-editable"
1515
- " if: matrix.system == 'ubuntu-latest'"
1616

17+
# Get latest clang.
1718
- "- name: setup clang 17"
1819
- " run: |"
1920
- " wget https://apt.llvm.org/llvm.sh"
@@ -22,9 +23,16 @@ ci_local:
2223
- " rm llvm.sh"
2324
- " if: matrix.system == 'ubuntu-latest'"
2425

26+
# Native toolchains.
2527
- "- run: sudo apt-get install gcc-13 g++-13 clang-17 clang-format-17"
2628
- " if: matrix.system == 'ubuntu-latest'"
2729

30+
# WASM.
31+
- "- run: sudo apt-get install emscripten"
32+
- " if: matrix.system == 'ubuntu-latest'"
33+
- "- run: em++ --version"
34+
- " if: matrix.system == 'ubuntu-latest'"
35+
2836
requirements:
2937
- datazen
3038
- vcorelib>=2.4.2

local/configs/python.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ author_info:
33
name: Vaughn Kottler
44
55
username: vkottler
6-
versions: ["3.11"]
76

7+
# CI matrix.
8+
versions: ["3.11", "3.12"]
89
systems:
910
- macos-latest
1011
- windows-latest

local/variables/package.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
major: 2
3-
minor: 8
4-
patch: 1
2+
major: 3
3+
minor: 0
4+
patch: 0
55
entry: mbs

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"
44

55
[project]
66
name = "yambs"
7-
version = "2.8.1"
7+
version = "3.0.0"
88
description = "Yet another meta build-system."
99
readme = "README.md"
1010
requires-python = ">=3.11"
@@ -16,6 +16,7 @@ maintainers = [
1616
]
1717
classifiers = [
1818
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
1920
"Operating System :: Microsoft :: Windows",
2021
"Operating System :: MacOS",
2122
"Operating System :: POSIX :: Linux",

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =====================================
22
# generator=datazen
33
# version=3.1.4
4-
# hash=f3af34a4b5815c617489419b194b30b5
4+
# hash=ce50fe613526c5b8b8b7fd8527e3566d
55
# =====================================
66

77
"""
@@ -29,6 +29,7 @@
2929
"description": DESCRIPTION,
3030
"versions": [
3131
"3.11",
32+
"3.12",
3233
],
3334
}
3435
setup(

tasks/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =====================================
22
# generator=datazen
33
# version=3.1.4
4-
# hash=9f62028523c3b5a953733ca89dcc3018
4+
# hash=7d378a1752611508007a77d4ca39a5af
55
# =====================================
66
"""
77
A module for project-specific task registration.
@@ -20,14 +20,9 @@ def audit_local_tasks() -> None:
2020
"""Ensure that shared task infrastructure is present."""
2121

2222
local = Path(__file__).parent.joinpath("mklocal")
23-
24-
# Also link a top-level file.
2523
top_level = local.parent.parent.joinpath("mklocal")
26-
if not top_level.is_symlink():
27-
assert not top_level.exists()
28-
top_level.symlink_to(local)
2924

30-
if local.is_symlink():
25+
if local.is_symlink() and top_level.is_symlink():
3126
return
3227

3328
# If it's not a symlink, it shouldn't be any other kind of file.
@@ -48,6 +43,11 @@ def audit_local_tasks() -> None:
4843
# Create the link.
4944
local.symlink_to(vmklib)
5045

46+
# Also link a top-level file.
47+
if not top_level.is_symlink():
48+
assert not top_level.exists()
49+
top_level.symlink_to(local)
50+
5151

5252
def register(
5353
manager: TaskManager,

tests/commands/test_native.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,25 @@
1818
from yambs.entry import main as yambs_main
1919

2020

21+
def test_native_command_wasm():
22+
"""Test the 'native' command with WASM variants."""
23+
24+
with in_dir(clean_scenario("native3")):
25+
assert yambs_main([PKG_NAME, "native"]) == 0
26+
27+
# Try to build (if we can).
28+
if platform == "linux" and which("ninja"):
29+
run(["ninja", "wasm"], check=True)
30+
31+
2132
def test_native_command_basic():
2233
"""Test the 'native' command."""
2334

2435
path = str(clean_scenario("native"))
2536

2637
# Ensure the directory dependency is cleaned as well.
2738
clean_scenario("native2")
39+
clean_scenario("native3")
2840

2941
with in_dir(path):
3042
assert yambs_main([PKG_NAME, "native", "-w", "-i"]) == 0

0 commit comments

Comments
 (0)