-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.toml
More file actions
56 lines (50 loc) · 2 KB
/
pixi.toml
File metadata and controls
56 lines (50 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[workspace]
authors = ["ZHU Yuhao (朱宇浩) <dr.yuhao.zhu@outlook.com>"]
channels = [
"https://conda.modular.com/max",
"https://repo.prefix.dev/modular-community",
"conda-forge",
]
description = "A command-line argument parser library for Mojo"
license = "Apache-2.0"
name = "argmojo"
platforms = ["osx-arm64", "linux-64"]
readme = "README.md"
version = "0.3.0"
[dependencies]
mojo = "==0.26.1"
python = ">=3.13,<3.14"
[tasks]
# format the code
format = "mojo format ./src ./tests ./examples"
# compile the package
package = "mojo package src/argmojo -o argmojo.mojopkg"
# run tests
test = """\
pixi run format \
&& pixi run package \
&& mojo run -I src -D ASSERT=all tests/test_parse.mojo \
&& mojo run -I src -D ASSERT=all tests/test_groups.mojo \
&& mojo run -I src -D ASSERT=all tests/test_collect.mojo \
&& mojo run -I src -D ASSERT=all tests/test_help.mojo \
&& mojo run -I src -D ASSERT=all tests/test_extras.mojo \
&& mojo run -I src -D ASSERT=all tests/test_subcommands.mojo \
&& mojo run -I src -D ASSERT=all tests/test_negative_numbers.mojo \
&& mojo run -I src -D ASSERT=all tests/test_persistent.mojo \
&& mojo run -I src -D ASSERT=all tests/test_typo_suggestions.mojo \
&& mojo run -I src -D ASSERT=all tests/test_completion.mojo \
&& mojo run -I src -D ASSERT=all tests/test_implies.mojo \
&& mojo run -I src -D ASSERT=all tests/test_const_require_equals.mojo \
&& mojo run -I src -D ASSERT=all tests/test_remainder_known.mojo"""
# NOTE: test_response_file.mojo is excluded — response file expansion
# is temporarily disabled to work around a Mojo compiler deadlock
# with -D ASSERT=all. Re-enable when the compiler bug is fixed.
# build example binaries
build = """pixi run package \
&& mojo build -I src examples/mgrep.mojo -o mgrep \
&& mojo build -I src examples/mgit.mojo -o mgit \
&& mojo build -I src examples/demo.mojo -o demo \
&& mojo build -I src examples/yu.mojo -o yu \
"""
# clean build artifacts
clean = "rm -f argmojo.mojopkg mgrep mgit demo"