Skip to content

Commit 06c0eff

Browse files
sinol-make file structure and run command (#1)
* sinol-make file structure and run command * fix indentation, mention changes made in run * Update pyproject.toml * compilation without makefiles * Add GNU GPLv3 license * remove measuring time with `time` * check for oiejq only in ~/.local/bin add --oiejq_path flag for run command replace asserts with proper error messages * rename oiejq.sh to oiejq * default values for compiler flags * add missing checks for Windows/Cygwin * Update readme * remove trailing new lines and spaces * refactor program compiling * change 'not in project' error message * change error message when oiejq download failed * Change names of compiler flags * fix errors when oiejq is not installed * fix oiejq errors, add missing exit * remove verbose flag * change behaviour of show_memory flag * change schema of subtasks in config * suggest subtask configuration when none found * Revert "lasta two commits" This reverts commit 63ac565 and ac0acca. * refactor --------- Co-authored-by: Tomasz Nowak <[email protected]>
1 parent 1379687 commit 06c0eff

File tree

13 files changed

+1557
-1
lines changed

13 files changed

+1557
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.venv
22
dist
33
*.egg-info
4-
build
4+
build
5+
.vscode

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# sinol-make
2+
CLI tool for creating sio2 task packages. \
3+
Currently in development and not yet ready to be used.
4+
5+
## Installing from source
6+
`pip3 install .`
7+

pyproject.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[build-system]
2+
requires = ["setuptools>=67.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "sinol-make"
7+
version = "0.0.1"
8+
authors = [
9+
{ name="Mateusz Masiarz", email="[email protected]" }
10+
]
11+
maintainers = [
12+
{ name="Tomasz Nowak", email="[email protected]" }
13+
]
14+
description = "CLI tool for creating sio2 task packages"
15+
readme = "README.md"
16+
requires-python = ">=3.7"
17+
classifiers = [
18+
"Programming Language :: Python :: 3",
19+
"License :: OSI Approved :: MIT License",
20+
"Operating System :: OS Independent",
21+
]
22+
dependencies = [
23+
"argparse",
24+
"requests",
25+
"PyYAML",
26+
]
27+
28+
[project.urls]
29+
"Homepage" = "https://github.com/sio2project/sinol-make"
30+
"Bug Tracker" = "https://github.com/sio2project/sinol-make/issues"
31+
32+
[project.scripts]
33+
sinol-make = "sinol_make:main"

src/sinol_make/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import argparse
2+
from sinol_make.util import get_commands
3+
4+
def main():
5+
parser = argparse.ArgumentParser(
6+
prog='sinol-make',
7+
description='Tool for creating and testing sio2 tasks',
8+
)
9+
subparsers = parser.add_subparsers(
10+
title='commands',
11+
description='sinol-make commands',
12+
dest='command',
13+
)
14+
subparsers.required = False
15+
16+
commands = get_commands()
17+
18+
for command in commands:
19+
command.configure_subparser(subparsers)
20+
21+
args = parser.parse_args()
22+
23+
for command in commands:
24+
if command.get_name() == args.command:
25+
command.run(args)
26+
exit(0)
27+
28+
parser.print_help()

0 commit comments

Comments
 (0)