diff --git a/.github/workflows/tox_matrix.yml b/.github/workflows/tox_matrix.yml index db7dfc47..dbeb7973 100644 --- a/.github/workflows/tox_matrix.yml +++ b/.github/workflows/tox_matrix.yml @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 0d34bba2..7ef64cc4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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(/\\\\+/, '\\\\') diff --git a/ci/docker/linux/tox/apt-packages.txt b/ci/docker/linux/tox/apt-packages.txt index c961db77..16971540 100644 --- a/ci/docker/linux/tox/apt-packages.txt +++ b/ci/docker/linux/tox/apt-packages.txt @@ -1,5 +1,3 @@ -python3.8-venv -python3.8-dev python3-pip python3.9-dev python3.9-venv diff --git a/ci/docker/shared/chocolatey/Install-Python.ps1 b/ci/docker/shared/chocolatey/Install-Python.ps1 new file mode 100644 index 00000000..0739ac76 --- /dev/null +++ b/ci/docker/shared/chocolatey/Install-Python.ps1 @@ -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 within + 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 tags." + } +} +catch { + Write-Host "The file $XmlFilePath does not exist or could not be loaded." + exit +} diff --git a/ci/docker/shared/chocolatey/python.xml b/ci/docker/shared/chocolatey/python.xml index 8927f7e5..f508145d 100644 --- a/ci/docker/shared/chocolatey/python.xml +++ b/ci/docker/shared/chocolatey/python.xml @@ -1,6 +1,5 @@ - diff --git a/ci/docker/windows/tox/Dockerfile b/ci/docker/windows/tox/Dockerfile index e1e7a97f..cf064609 100644 --- a/ci/docker/windows/tox/Dockerfile +++ b/ci/docker/windows/tox/Dockerfile @@ -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 ))) ` @@ -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 ; ` @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 6ded6e9f..f81513c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ @@ -87,6 +87,7 @@ build-frontend = "build" skip = [ "cp36-*", "cp37-*", + "cp38-*", "pp*", "*-win32", "*-musllinux*", diff --git a/tox.ini b/tox.ini index 7399e023..1a3257fd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38, py39, py310, py311, py312 +envlist = py39, py310, py311, py312 min_version = 4.11 [testenv]