Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: check-yaml
# Leave black at the bottom so all touchups are done before it is run.
- repo: https://github.com/psf/black
rev: 26.1.0
rev: 26.5.1
hooks:
- id: black
language_version: python3
Expand Down
6 changes: 2 additions & 4 deletions azure-pipelines/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ attrs==22.2.0
# Twisted
# Must match the version bundled in pkgs.zip/src/ for each Python version.
# A version mismatch causes a sys.modules conflict at runtime (see SG-42304).
Twisted==22.10.0 ; python_version < "3.9"
Twisted==24.10.0 ; python_version >= "3.9" and python_version < "3.13"
Twisted==24.10.0 ; python_version < "3.13"
Twisted~=24.11.0 ; python_version >= "3.13"

#-------------------------------------------------------------------------------
# websocket-client
# Test-only dependency (not bundled in pkgs.zip).
websocket-client==1.6.1 ; python_version < "3.9" # Last version supporting Python 3.7
websocket-client~=1.9.0 ; python_version >= "3.9"
websocket-client~=1.9.0
1 change: 1 addition & 0 deletions info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ description: "Provides the server used to listen to Flow Production Tracking cli
# Required minimum versions for this item to run
requires_shotgun_version:
requires_core_version: "v0.19.18"
minimum_python_version: "3.9"
59 changes: 27 additions & 32 deletions resources/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,16 @@ skipped when `System.PullRequest.SourceBranch` ends with `-automated` or
Officially Supported Python Versions:

- macOS
- 3.7.16
- 3.9.16
- 3.10.13
- 3.11.9
- 3.13
- Windows
- 3.7.9
- 3.9.13
- 3.10.11
- 3.11.9
- 3.13
- Linux:
- 3.7.16
- 3.9.16
- 3.10.13
- 3.11.9
Expand Down Expand Up @@ -143,40 +140,38 @@ Linux and macOS:
We highly recommend to use [pyenv](https://github.com/pyenv/pyenv).

```shell
rm -Rf $HOME/venv/tk-framework-desktopserver-37
pyenv install 3.7.16
pyenv shell 3.7.16
pyenv install 3.9.16
pyenv shell 3.9.16
python -m pip install -U pip virtualenv
python -m virtualenv $HOME/venv/tk-framework-desktopserver-37
python -m virtualenv $HOME/venv/tk-framework-desktopserver-39

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```

Windows:
- Use an admin powershell console.
- Install python 3.7.9 from https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe in C:\python\3.7.9
- Install python 3.9.13 from https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe in C:\python\3.9.13
- Install python 3.10.11 from https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe in C:\python\3.10.11

```shell
if (test-path $HOME\venv\tk-framework-desktopserver-37) {
Remove-Item $HOME\venv\tk-framework-desktopserver-37 -Recurse -Force
if (test-path $HOME\venv\tk-framework-desktopserver-39) {
Remove-Item $HOME\venv\tk-framework-desktopserver-39 -Recurse -Force
}
C:\python\3.7.9\python.exe -m pip install -U pip virtualenv
C:\python\3.7.9\python.exe -m virtualenv $HOME\venv\tk-framework-desktopserver-37
C:\python\3.9.13\python.exe -m pip install -U pip virtualenv
C:\python\3.9.13\python.exe -m virtualenv $HOME\venv\tk-framework-desktopserver-39

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```

### In macOS, update requirements.txt files

- resources/python/requirements/3.7/requirements.txt
- resources/python/requirements/3.9/requirements.txt
```shell
# Activate python 3.7 virtualenv
source $HOME/venv/tk-framework-desktopserver-37/bin/activate
# Activate python 3.9 virtualenv
source $HOME/venv/tk-framework-desktopserver-39/bin/activate

# Copy requirements.txt to temporal folder
cp $HOME/instances/tk-framework-desktopserver/resources/python/requirements/3.7/requirements.txt /tmp/requirements.txt
cp $HOME/instances/tk-framework-desktopserver/resources/python/requirements/3.9/requirements.txt /tmp/requirements.txt

# Chdir to temporal folder
cd /tmp
Expand All @@ -193,14 +188,14 @@ C:\python\3.7.9\python.exe -m virtualenv $HOME\venv\tk-framework-desktopserver-3
# Get the list of packages installed versions
pip list --path temporal_requirements

# Compare versions and update the file $HOME/instances/tk-framework-desktopserver/resources/python/requirements/3.7/requirements.txt
# Compare versions and update the file $HOME/instances/tk-framework-desktopserver/resources/python/requirements/3.9/requirements.txt

# Cleanup everything
rm -Rf temporal_requirements
rm -f requirements.txt
```

- Repeat steps for Python 3.9 and 3.10
- Repeat steps for Python 3.10, 3.11, 3.13

### In macOS, activate virtualenvs and execute the script `update_requirements.py`

Expand All @@ -210,21 +205,21 @@ every platform (Python Version, Operating System).
```shell
cd $HOME/instances/tk-framework-desktopserver/resources/python

source $HOME/venv/tk-framework-desktopserver-37/bin/activate
source $HOME/venv/tk-framework-desktopserver-39/bin/activate
python update_requirements.py --clean-pip

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```

### In macOS, activate virtualenvs and execute the script `install_source_only.sh`

```shell
cd $HOME/instances/tk-framework-desktopserver/resources/python

source $HOME/venv/tk-framework-desktopserver-37/bin/activate
source $HOME/venv/tk-framework-desktopserver-39/bin/activate
bash install_source_only.sh

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```

### In macOS, push changes to the repository
Expand All @@ -247,13 +242,13 @@ cd $HOME/instances/tk-framework-desktopserver
git pull
cd resources/python

source $HOME/venv/tk-framework-desktopserver-37/bin/activate
source $HOME/venv/tk-framework-desktopserver-39/bin/activate
bash install_binary_linux.sh
git add .
git commit -am "Update binary requirements in Linux Python 3.7"
git commit -am "Update binary requirements in Linux Python 3.9"
git push

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```


Expand All @@ -262,13 +257,13 @@ git push

```shell
cd $HOME\instances\tk-framework-desktopserver\resources\python
& "$HOME\venv\tk-framework-desktopserver-37\Scripts\activate.ps1"
& "$HOME\venv\tk-framework-desktopserver-39\Scripts\activate.ps1"
.\install_binary_windows.ps1
git add .
git commit -am "Update binary requirements in Windows Python 3.7"
git commit -am "Update binary requirements in Windows Python 3.9"
git push

# Repeat steps for Python 3.9 and 3.10
# Repeat steps for Python 3.10, 3.11, 3.13
```


Expand All @@ -282,10 +277,10 @@ git push
```shell
cd $HOME/instances/tk-framework-desktopserver/resources/python

source $HOME/venv/tk-framework-desktopserver-37/bin/activate
source $HOME/venv/tk-framework-desktopserver-39/bin/activate
bash install_binary_mac.sh
git add .
git commit -am "Update binary requirements in macOS Python 3.7"
git commit -am "Update binary requirements in macOS Python 3.9"
git push

# Repeat steps for each supported Python version
Expand Down
13 changes: 0 additions & 13 deletions resources/python/bin/3.7/explicit_requirements.txt

This file was deleted.

Binary file not shown.

This file was deleted.

26 changes: 0 additions & 26 deletions resources/python/bin/3.7/linux/cffi-1.15.1.dist-info/LICENSE

This file was deleted.

34 changes: 0 additions & 34 deletions resources/python/bin/3.7/linux/cffi-1.15.1.dist-info/METADATA

This file was deleted.

45 changes: 0 additions & 45 deletions resources/python/bin/3.7/linux/cffi-1.15.1.dist-info/RECORD

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions resources/python/bin/3.7/linux/cffi-1.15.1.dist-info/WHEEL

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions resources/python/bin/3.7/linux/cffi/__init__.py

This file was deleted.

Loading
Loading