Skip to content

Commit

Permalink
Build System - Black to 22.8.0. Per-Maya-version Python requirements.
Browse files Browse the repository at this point in the history
Black was changed to v22.8.0, because this is the last version that
supports Python 3.6.x.

I've created per-Maya-version requirements files so we can control the
individual versions that each Maya version is getting. Each Maya version
may be on a different Python version.
  • Loading branch information
david-cattermole committed Sep 14, 2024
1 parent 2d87324 commit 2a6f53f
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 13 deletions.
9 changes: 4 additions & 5 deletions scripts/internal/python_venv_activate.bash
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ source "${PYTHON_VIRTUAL_ENV_ACTIVATE_SCRIPT}"
# Install requirements
if [ ${REQUIRE_PACKAGE_INSTALL} -eq 1 ]; then
${PYTHON_EXE} -m pip install --upgrade pip
${PYTHON_EXE} -m pip install -r "${PROJECT_ROOT}/share/requirements-dev.txt"
${PYTHON_EXE} -m pip install -r "${PROJECT_ROOT}/share/requirements-doc.txt"

REQUIRE_DEV_MAYA_VERSION_FILE="${PROJECT_ROOT}/share/requirements-dev-maya${MAYA_VERSION}.txt"
if [ -f "$REQUIRE_DEV_MAYA_VERSION_FILE" ]; then
${PYTHON_EXE} -m pip install -r $REQUIRE_DEV_MAYA_VERSION_FILE
fi
REQUIRE_DOC_MAYA_VERSION_FILE="${PROJECT_ROOT}/share/requirements-doc-maya${MAYA_VERSION}.txt"

${PYTHON_EXE} -m pip install -r $REQUIRE_DEV_MAYA_VERSION_FILE
${PYTHON_EXE} -m pip install -r $REQUIRE_DOC_MAYA_VERSION_FILE
fi

cd ${PROJECT_ROOT}
11 changes: 4 additions & 7 deletions scripts/internal/python_venv_activate.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ ECHO Activating Python Virtual Environment "%PYTHON_VIRTUAL_ENV_DIR_NAME%"
CALL %PYTHON_VIRTUAL_ENV_ACTIVATE_SCRIPT%

:: Install requirements
SET MAYA_VERSION_REQUIRE_FILE=%PROJECT_ROOT%\share\requirements-dev-maya%MAYA_VERSION%.txt
SET MAYA_VERSION_REQUIRE_DEV_FILE=%PROJECT_ROOT%\share\requirements-dev-maya%MAYA_VERSION%.txt
SET MAYA_VERSION_REQUIRE_DOC_FILE=%PROJECT_ROOT%\share\requirements-doc-maya%MAYA_VERSION%.txt
IF "%REQUIRE_PACKAGE_INSTALL%"=="1" (
:: %PYTHON_EXE% -m pip install --upgrade pip
%PYTHON_EXE% -m pip install -r "%PROJECT_ROOT%\share\requirements-dev.txt"
%PYTHON_EXE% -m pip install -r "%PROJECT_ROOT%\share\requirements-doc.txt"

IF EXIST %MAYA_VERSION_REQUIRE_FILE% (
%PYTHON_EXE% -m pip install -r %MAYA_VERSION_REQUIRE_FILE%
)
%PYTHON_EXE% -m pip install -r %MAYA_VERSION_REQUIRE_DEV_FILE%
%PYTHON_EXE% -m pip install -r %MAYA_VERSION_REQUIRE_DEV_FILE%
)

:: Return back project root directory.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black==24.3.0
# Expects Python 3.6.x
black==22.8.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
5 changes: 5 additions & 0 deletions share/requirements-dev-maya2019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Expects Python 3.6.x
black==22.8.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
5 changes: 5 additions & 0 deletions share/requirements-dev-maya2020.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Expects Python 3.6.x
black==22.8.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
5 changes: 5 additions & 0 deletions share/requirements-dev-maya2022.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Expects Python 3.6.x
black==22.8.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
5 changes: 5 additions & 0 deletions share/requirements-dev-maya2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Expects Python 3.6.x
black==22.8.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
5 changes: 5 additions & 0 deletions share/requirements-dev-maya2024.txt
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Expects Python 3.9.x
black==24.3.0
pylint==2.13.9
flake8==4.0.1
cpplint==1.6.0
ruff==0.0.261
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Expects Python 3.6.x
Sphinx>=4.5.0
furo>=2022.2.23
3 changes: 3 additions & 0 deletions share/requirements-doc-maya2019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Expects Python 3.6.x
Sphinx>=4.5.0
furo>=2022.2.23
3 changes: 3 additions & 0 deletions share/requirements-doc-maya2020.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Expects Python 3.6.x
Sphinx>=4.5.0
furo>=2022.2.23
3 changes: 3 additions & 0 deletions share/requirements-doc-maya2022.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Expects Python 3.6.x
Sphinx>=4.5.0
furo>=2022.2.23
3 changes: 3 additions & 0 deletions share/requirements-doc-maya2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Expects Python 3.6.x
Sphinx>=4.5.0
furo>=2022.2.23
3 changes: 3 additions & 0 deletions share/requirements-doc-maya2024.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Expects Python 3.9.x
Sphinx>=4.5.0
furo>=2022.2.23

0 comments on commit 2a6f53f

Please sign in to comment.