Skip to content

Commit

Permalink
Make toltecmk a module script
Browse files Browse the repository at this point in the history
  • Loading branch information
matteodelabre committed Aug 7, 2021
1 parent 79e9fcb commit fe5505b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 27,16 @@ test:
python -m unittest

format:
black --line-length 80 --check --diff toltec tests toltecmk
black --line-length 80 --check --diff toltec tests

format-fix:
black --line-length 80 toltec tests toltecmk
black --line-length 80 toltec tests

lint:
@echo "==> Typechecking files"
mypy --disallow-untyped-defs toltec toltecmk
mypy --disallow-untyped-defs toltec
@echo "==> Linting files"
pylint toltec toltecmk
pylint toltec

.PHONY: \
help \
Expand Down
4 changes: 3 additions & 1 deletion tests/test_toltecmk.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 28,9 @@ def test_build_rmkit(self) -> None:

result = subprocess.run(
[
"./toltecmk",
"python3",
"-m",
"toltec",
"--work-dir",
work_dir,
"--dist-dir",
Expand Down
3 changes: 3 additions & 0 deletions toltec/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 1,5 @@
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT
"""Toltec build system"""

from .recipe_parsers import parse as parse_recipe
6 changes: 4 additions & 2 deletions toltecmk → toltec/__main__.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 1,3 @@
#!/usr/bin/env python3
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT
"""Build packages from the recipe in [DIR]."""
Expand All @@ -14,7 13,10 @@
from toltec.repo import make_index
from toltec import util

parser = argparse.ArgumentParser(description=__doc__)
parser = argparse.ArgumentParser(
prog="toltecmk",
description=__doc__,
)

parser.add_argument(
"recipe_dir",
Expand Down

0 comments on commit fe5505b

Please sign in to comment.