From: Aleš Mrázek Date: Mon, 29 Jun 2026 14:42:20 +0000 (+0200) Subject: poe: scripts: use PyPI instead of Poetry X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee8f7f4e8f780d90fd99122f7943628a07548521;p=thirdparty%2Fknot-resolver.git poe: scripts: use PyPI instead of Poetry --- diff --git a/poe b/poe index 815428a37..ae4c949d0 100755 --- a/poe +++ b/poe @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash script_dir="$(dirname "$(readlink -f "$0")")" -exec poetry --directory "$script_dir" run -- poe --root "$script_dir" "$@" +poe --root "$script_dir" "$@" diff --git a/scripts/poe-tasks/check-files b/scripts/poe-tasks/check-files index ef2f18610..9b8d8b2d9 100755 --- a/scripts/poe-tasks/check-files +++ b/scripts/poe-tasks/check-files @@ -9,14 +9,14 @@ set +e # check that all dependencies are installed correctly echo -e "${yellow}Checking that all dependencies are properly installed...${reset}" -poetry install --dry-run --only main,dev,lint | grep "0 install" > /dev/null +! python -m pip install --dry-run ".[prometheus,watchdog,dev,test,lint,docs]" | grep -qE "^Would install .{20,}$" check_rv $? echo # early exit when dependencies are not installed if test "$aggregated_rv" -ne "0"; then echo -e "${red}Dependencies are not properly installed. Run this command to fix it:${reset}" - echo -e " ${red}poetry install${reset}" + echo -e " ${red}python -m pip install ".[prometheus,watchdog,dev,test,lint,docs]"${reset}" exit 1 fi diff --git a/scripts/poe-tasks/run b/scripts/poe-tasks/run index 4d3ebc8cc..fec296df1 100755 --- a/scripts/poe-tasks/run +++ b/scripts/poe-tasks/run @@ -13,23 +13,12 @@ echo Creating missing runtime directories echo ------------------------------------ mkdir -vp $KRES_DEV_INSTALL_DIR/run/knot-resolver $KRES_DEV_INSTALL_DIR/var/cache/knot-resolver echo -echo --------------------------------------- -echo Building Python komponents using Poetry -echo --------------------------------------- -poetry build -# copy native modules from build directory to source directory -shopt -s globstar -shopt -s nullglob -for d in build/lib*; do - for f in "python/$d/"**/*.so; do - cp -v "$f" ${f#"python/$d/"} - done -done -shopt -u globstar -shopt -u nullglob - +echo ------------------------------------------------------ +echo Building/installing Python components using setuptools +echo ------------------------------------------------------ +python -m pip install -e . echo -echo -------------------------------------- -echo Starting Knot Resolver wit the Manager -echo -------------------------------------- -python3 -m knot_resolver.manager --config "$KRES_DEV_CONFIG_FILE" "$@" +echo ---------------------- +echo Starting Knot Resolver +echo ---------------------- +knot-resolver --config "$KRES_DEV_CONFIG_FILE" "$@"