mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Rewrite invalid imports checker to Python
Makes it consistent with other checkers we already have
This commit is contained in:
parent
66105e8a3a
commit
b830a6faa3
3 changed files with 67 additions and 11 deletions
|
@ -13,18 +13,7 @@ export PKG_CONFIG_PATH="${CURA_BUILD_ENV_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
|||
|
||||
cd "${PROJECT_DIR}"
|
||||
|
||||
# Check for plugins.* import statements. These imports may work when running from source,
|
||||
# but will fail in some build types (linux and mac)
|
||||
GREP_OUTPUT=$(grep -Ern "^\s*(from plugins|import plugins)" --include \*.py "${PROJECT_DIR}" || true)
|
||||
echo "$GREP_OUTPUT"
|
||||
|
||||
if [ -z "$GREP_OUTPUT" ]
|
||||
then
|
||||
echo "invalid imports checker: OK"
|
||||
else
|
||||
echo "error: sources contain invalid imports. Use relative imports when referencing plugin source files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Clone Uranium and set PYTHONPATH first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue