8000 feat: add ubuntu-24.04 (#269) · actions/python-versions@eb9433f · GitHub
[go: up one dir, main page]

Skip to content

Commit eb9433f

Browse files
authored
feat: add ubuntu-24.04 (#269)
* feat: add ubuntu-24.04 * chore: drop support for Python 2.x builds
1 parent 7c3d29f commit eb9433f

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

.github/workflows/build-python-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
PLATFORMS:
1616
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
1717
required: true
18-
default: 'ubuntu-20.04,ubuntu-22.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
18+
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
1919
pull_request:
2020
paths-ignore:
2121
- 'versions-manifest.json'
@@ -39,7 +39,7 @@ jobs:
3939
- name: Generate execution matrix
4040
id: generate-matrix
4141
run: |
42-
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
42+
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
4343
$matrix = @()
4444
4545
foreach ($configuration in $configurations) {

builders/ubuntu-python-builder.psm1

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,9 @@ class UbuntuPythonBuilder : NixPythonBuilder {
3737
$configureString += " --enable-shared"
3838
$configureString += " --enable-optimizations"
3939

40-
### Compile with ucs4 for Python 2.x. On 3.x, ucs4 is enabled by default
41-
if ($this.Version -lt "3.0.0") {
42-
$configureString += " --enable-unicode=ucs4"
43-
}
44-
45-
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
40+
### Compile with support of loadable sqlite extensions.
4641
### Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
47-
if ($this.Version -ge "3.2.0") {
48-
$configureString += " --enable-loadable-sqlite-extensions"
49-
}
42+
$configureString += " --enable-loadable-sqlite-extensions"
5043

5144
Write-Host "The passed configure options are: "
5245
Write-Host $configureString
@@ -60,17 +53,13 @@ class UbuntuPythonBuilder : NixPythonBuilder {
6053
Prepare system environment by installing dependencies and required packages.
6154
#>
6255

63-
if (($this.Version -gt "3.0.0") -and ($this.Version -lt "3.5.3")) {
64-
Write-Host "Python3 versions lower than 3.5.3 are not supported"
56+
if ($this.Version -lt "3.5.3") {
57+
Write-Host "Python versions lower than 3.5.3 are not supported"
6558
exit 1
6659
}
6760

6861
### Compile with tkinter support
69-
if ($this.Version -gt "3.0.0") {
70-
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
71-
} else {
72-
$tkinterInstallString = "sudo apt install -y python-tk tk-dev"
73-
}
62+
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
7463

7564
Execute-Command -Command "sudo apt-get update"
7665
Execute-Command -Command $tkinterInstallString
@@ -85,7 +74,8 @@ class UbuntuPythonBuilder : NixPythonBuilder {
8574
"libsqlite3-dev",
8675
"libncursesw5-dev",
8776
"libreadline-dev",
88-
"libgdbm-dev"
77+
"libgdbm-dev",
78+
"liblzma-dev"
8979
) | ForEach-Object {
9080
Execute-Command -Command "sudo apt install -y $_"
9181
}

0 commit comments

Comments
 (0)
0