Skip to content

Commit

Permalink
Bump Python version (tgstation#14090)
Browse files Browse the repository at this point in the history
* Fix Pip for Bootstrap (#72488)

Mothblocks forgot to update the bootstrap script to the new python
version when they changed the python dependency version

That path descriptor file is now automatically generated during
bootstrap, which will prevent this issue from happening again in the
future, unless they change the path descriptor format

* Bump Python version

---------

Co-authored-by: Zephyr <[email protected]>
  • Loading branch information
vvvv-vvvv and ZephyrTFA authored Oct 7, 2023
1 parent 5a322f1 commit 46c8ce4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export SPACEMAN_DMM_VERSION=suite-1.7.2
export SPACEMAN_DMM_COMMIT_HASH=3588de97ff09fdd02d96f178392f3c59b19ebfc4

# Python version for mapmerge and other tools
export PYTHON_VERSION=3.7.9
export PYTHON_VERSION=3.10.11
6 changes: 0 additions & 6 deletions tools/bootstrap/python37._pth

This file was deleted.

7 changes: 6 additions & 1 deletion tools/bootstrap/python_.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ if (!(Test-Path $PythonExe -PathType Leaf)) {

[System.IO.Compression.ZipFile]::ExtractToDirectory($Archive, $PythonDir)

$PythonVersionArray = $PythonVersion.Split(".")
$PythonVersionString = "python$($PythonVersionArray[0])$($PythonVersionArray[1])"
Write-Output "Generating PATH descriptor."
New-Item "$Cache/$PythonVersionString._pth" | Out-Null
Set-Content "$Cache/$PythonVersionString._pth" "$PythonVersionString.zip`n.`n..\..\..`nimport site`n"
# Copy a ._pth file without "import site" commented, so pip will work
Copy-Item "$Bootstrap/python37._pth" $PythonDir `
Copy-Item "$Cache/$PythonVersionString._pth" $PythonDir `
-ErrorAction Stop

Remove-Item $Archive
Expand Down
2 changes: 1 addition & 1 deletion tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pygit2==1.7.2
pygit2==1.13.1
bidict==0.22.0
Pillow==10.0.1

Expand Down

0 comments on commit 46c8ce4

Please sign in to comment.