Skip to content

Commit 260dff2

Browse files
committed
python: unification of modules execution
1 parent fcfdf38 commit 260dff2

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ breathe = "^4.35.0"
6565
json-schema-for-humans = "^0.47"
6666

6767
[tool.poetry.scripts]
68-
kresctl = 'knot_resolver.client.main:main'
69-
knot-resolver = 'knot_resolver.manager.main:main'
68+
kresctl = "knot_resolver.client.__main__"
69+
knot-resolver = 'knot_resolver.manager.__main__'
7070

7171
[tool.poe.tasks]
7272
# tasks runed through scripts located in 'scripts/poe-tasks/'

scripts/poe-tasks/check

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ echo
3737

3838
# check that doc/_static/config.schema.json is the latest
3939
echo -e "${yellow}Checking doc/_static/config.schema.json${reset}"
40-
python -m knot_resolver.client schema | diff - doc/_static/config.schema.json
40+
python -m knot_resolver.client.__main__ schema | diff - doc/_static/config.schema.json
4141
check_rv $?
4242
echo
4343

scripts/poe-tasks/examples

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ source $src_dir/utils/_env.sh
77
# validate all configuration examples
88
for example in $PWD/etc/config/config.example.*.yaml;
99
do
10-
python3 -m knot_resolver.client validate --no-strict $example;
10+
python3 -m knot_resolver.client.__main__ validate --no-strict $example;
1111
done

scripts/poe-tasks/kresctl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ is_build_dev_dir_configured
99
echo
1010

1111
# run knot-resolver client
12-
python3 -m knot_resolver.client --config "$KRES_DEV_CONFIG_FILE" "$@"
12+
python3 -m knot_resolver.client.__main__ --config "$KRES_DEV_CONFIG_FILE" "$@"

scripts/poe-tasks/run

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ echo
3232
echo --------------------------------------
3333
echo Starting Knot Resolver wit the Manager
3434
echo --------------------------------------
35-
python3 -m knot_resolver.manager --config "$KRES_DEV_CONFIG_FILE" "$@"
35+
python3 -m knot_resolver.manager.__main__ --config "$KRES_DEV_CONFIG_FILE" "$@"

scripts/poe-tasks/schema

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ schema_file="$gitroot/doc/_static/config.schema.json"
88

99
meson_setup_configure > /dev/null
1010
cp $build_dir/python/knot_resolver/constants.py $gitroot/python/knot_resolver/constants.py
11-
python -m knot_resolver.client schema > $schema_file
11+
python -m knot_resolver.client.__main__ schema > $schema_file
1212

1313
echo New JSON schema saved to $schema_file

0 commit comments

Comments
 (0)