Skip to content

Commit

Permalink
python version bump changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Dec 2, 2023
1 parent f9461b2 commit bc37087
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sonar.sources=.
sonar.exclusions=mobsf/static/**/*,mobsf/templates/**/*
sonar.sourceEncoding=UTF-8
sonar.python.version=3.7, 3.8, 3.9, 3.10, 3.11
sonar.python.version=3.10, 3.11
6 changes: 3 additions & 3 deletions setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rem Python Check
set /a count=0
where python >nul 2>&1 && (
echo [INSTALL] Checking for Python version 3.9+
echo [INSTALL] Checking for Python version 3.10+
:redo
if %count% lss 3 (
set /a count+=1
Expand All @@ -13,10 +13,10 @@ where python >nul 2>&1 && (
) else (
exit /b
)
echo %var%|findstr /R "[3].[91011]" >nul
echo %var%|findstr /R "[3].[1011]" >nul
if errorlevel 1 (
if "%var%"=="" goto redo
echo [ERROR] MobSF dependencies require Python 3.9-3.11. Your python points to %var%
echo [ERROR] MobSF dependencies require Python 3.10-3.11. Your python points to %var%
exit /b
) else (
echo [INSTALL] Found %var%
Expand Down
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ fi
python_version="$(python3 --version 2>&1 | awk '{print $2}')"
py_major=$(echo "$python_version" | cut -d'.' -f1)
py_minor=$(echo "$python_version" | cut -d'.' -f2)
if [ "$py_major" -eq "3" ] && [ "$py_minor" -gt "8" ] && [ "$py_minor" -lt "12" ]; then
if [ "$py_major" -eq "3" ] && [ "$py_minor" -gt "9" ] && [ "$py_minor" -lt "12" ]; then
echo "[INSTALL] Found Python ${python_version}"
else
echo "[ERROR] MobSF dependencies require Python 3.9 - 3.11. You have Python version ${python_version} or python3 points to Python ${python_version}."
echo "[ERROR] MobSF dependencies require Python 3.10 - 3.11. You have Python version ${python_version} or python3 points to Python ${python_version}."
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39, py310, py311
envlist = py310, py311
skipsdist = True
isolated_build = true

Expand Down

0 comments on commit bc37087

Please sign in to comment.