Skip to content

Commit

Permalink
Merge pull request #168 from UIUCLibrary/remove-python38-support
Browse files Browse the repository at this point in the history
Remove python38 support
  • Loading branch information
henryborchers authored Nov 1, 2024
2 parents 6f25bec + 13f2c14 commit 31d96ca
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ['3.8' ,'3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
include:
- os: macos-latest
compiler_version: 14.0
Expand Down
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ library identifier: 'JenkinsPythonHelperLibrary@2024.7.0', retriever: modernSCM(
])

SONARQUBE_CREDENTIAL_ID = 'sonarcloud_token'
SUPPORTED_MAC_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12']
SUPPORTED_LINUX_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12']
SUPPORTED_WINDOWS_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12']
SUPPORTED_MAC_VERSIONS = ['3.9', '3.10', '3.11', '3.12']
SUPPORTED_LINUX_VERSIONS = ['3.9', '3.10', '3.11', '3.12']
SUPPORTED_WINDOWS_VERSIONS = ['3.9', '3.10', '3.11', '3.12']

def installCerts(cacheLocation){
def cachedFile = "${cacheLocation}\\roots.sst".replaceAll(/\\\\+/, '\\\\')
Expand Down
2 changes: 0 additions & 2 deletions ci/docker/linux/tox/apt-packages.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
python3.8-venv
python3.8-dev
python3-pip
python3.9-dev
python3.9-venv
Expand Down
32 changes: 32 additions & 0 deletions ci/docker/shared/chocolatey/Install-Python.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
param (
[Parameter(Mandatory=$true)]
[string]$XmlFilePath
)
choco.exe install -y --stoponfirstfailure --no-progress --verbose $XmlFilePath
refreshenv ;

try {
# Attempt to load the XML file
[xml]$xmlContent = Get-Content -Path $XmlFilePath -ErrorAction Stop

if ($xmlContent.SelectNodes("//packages")) {
# Iterate over each <package> within <packages>
foreach ($package in $xmlContent.packages.package) {
Write-Host "Testing version for $($package.id)"
if ($package.id -match "python(\d)(\d+)")
{
$majorVersion = $matches[1]
$minorVersion = $matches[2]
$formattedVersion = "$majorVersion.$minorVersion"
py -$formattedVersion --version
}
Write-Host "-----------------------------"
}
} else {
Write-Host "The XML file does not contain any <packages> tags."
}
}
catch {
Write-Host "The file $XmlFilePath does not exist or could not be loaded."
exit
}
1 change: 0 additions & 1 deletion ci/docker/shared/chocolatey/python.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="python38"/>
<package id="python39"/>
<package id="python310"/>
<package id="python311"/>
Expand Down
20 changes: 7 additions & 13 deletions ci/docker/windows/tox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
Remove-Item -Force -Recurse ${Env:TEMP}\*


FROM BASE_BUILDER as CHOCOLATEY_BASE
FROM BASE_BUILDER AS CHOCOLATEY_BASE
ARG CHOCOLATEY_SOURCE=https://chocolatey.org/api/v2
ARG ChocolateyEnvironmentDebug=false
ADD ci/docker/shared/chocolatey/install_choco.ps1 choco/install_choco.ps1
COPY ci/docker/shared/chocolatey/install_choco.ps1 choco/install_choco.ps1
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
./choco/install_choco.ps1 -packageRepo $env:CHOCOLATEY_SOURCE ; `
if( -not ([string]::IsNullOrEmpty($Env:CHOCOLATEY_SOURCE ))) `
Expand All @@ -56,20 +56,14 @@ RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
Remove-Item -Force -Recurse ${Env:TEMP}\*


ADD ci/docker/shared/chocolatey/python.xml choco/python.config
RUN C:\ProgramData\chocolatey\bin\choco.exe install -y --stoponfirstfailure --no-progress --verbose choco/python.config ;`
COPY ci/docker/shared/chocolatey/python.xml choco/python.config
COPY ci/docker/shared/chocolatey/Install-Python.ps1 c:/choco/Install-Python.ps1
RUN c:/choco/Install-Python.ps1 choco/python.config ;`
Remove-Item C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey -Recurse ; `
refreshenv ; `
Remove-Item -Force -Recurse ${Env:TEMP}\* ; `
py --list ;`
py -3.8 --version ; `
py -3.9 --version ; `
py -3.10 --version ; `
py -3.11 --version ; `
py -3.12 --version ; `
Write-Host "Installing Python with Chocolatey - Done"

ADD ci/docker/shared/chocolatey/packages.config choco/packages.config
COPY ci/docker/shared/chocolatey/packages.config choco/packages.config
RUN C:\ProgramData\chocolatey\bin\choco.exe sources ; `
C:\ProgramData\chocolatey\bin\choco.exe install -y --stoponfirstfailure --no-progress --verbose choco/packages.config ;`
Remove-Item C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey -Recurse ; `
Expand All @@ -83,7 +77,7 @@ RUN C:\ProgramData\chocolatey\bin\choco.exe sources ; `


# ==============================================================================
FROM CHOCOLATEY_BASE as CONAN_BUILDER
FROM CHOCOLATEY_BASE AS CONAN_BUILDER
ARG PIP_EXTRA_INDEX_URL
ARG CONAN_USER_HOME
ARG PIP_INDEX_URL
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
'Topic :: Software Development :: Libraries :: Python Modules',
]
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { file="LICENSE"}
description = "Image to text processing using Google Tesseract"
maintainers = [
Expand Down Expand Up @@ -87,6 +87,7 @@ build-frontend = "build"
skip = [
"cp36-*",
"cp37-*",
"cp38-*",
"pp*",
"*-win32",
"*-musllinux*",
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 = py38, py39, py310, py311, py312
envlist = py39, py310, py311, py312
min_version = 4.11

[testenv]
Expand Down

0 comments on commit 31d96ca

Please sign in to comment.