Skip to content

Commit

Permalink
no more python 3.7, 3.8 for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines committed Jan 30, 2025
1 parent 8ad39c1 commit b165176
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ci/azure-wheel-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
brew install python
export SKIP_EMBEDED_PYTHON_TEST=true
packaging/python/test_wheels.sh /usr/local/bin/python3 wheelhouse/*.whl
condition: and(eq(variables['agent.os'], 'Darwin'), eq(variables['python.version'], '3.7'))
condition: and(eq(variables['agent.os'], 'Darwin'), eq(variables['python.version'], '3.9'))
displayName: 'Test with brew Python'
- task: UsePythonVersion@0
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-win-installer-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.9'
displayName: "Use System Python"

- task: BatchScript@1
Expand Down
4 changes: 2 additions & 2 deletions ci/win_build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ cd $BUILD_SOURCESDIRECTORY/build
-DNRN_ENABLE_PYTHON=ON \
-DNRN_ENABLE_RX3D=ON \
-DNRN_RX3D_OPT_LEVEL=2 \
-DPYTHON_EXECUTABLE=/c/Python37/python.exe \
-DPYTHON_EXECUTABLE=/c/Python39/python.exe \
-DNRN_ENABLE_PYTHON_DYNAMIC=ON \
-DNRN_PYTHON_DYNAMIC='c:/Python37/python.exe;c:/Python38/python.exe;c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe;c:/Python313/python.exe' \
-DNRN_PYTHON_DYNAMIC='c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe;c:/Python313/python.exe' \
-DCMAKE_INSTALL_PREFIX='/c/nrn-install' \
-DMPI_CXX_LIB_NAMES:STRING=msmpi \
-DMPI_C_LIB_NAMES:STRING=msmpi \
Expand Down
2 changes: 0 additions & 2 deletions ci/win_download_deps.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
:: download all installers

:: python
pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.7.exe https://www.python.org/ftp/python/3.7.7/python-3.7.7-amd64.exe || goto :error
pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.8.exe https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe || goto :error
pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.9.exe https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe || goto :error
pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.10.exe https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe || goto :error
pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.11.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe || goto :error
Expand Down
8 changes: 0 additions & 8 deletions ci/win_install_deps.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,24 @@
:: install all dependencies

:: install python
python-3.7.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python37 || goto :error
python-3.8.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python38 || goto :error
python-3.9.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python39 || goto :error
python-3.10.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python310 || goto :error
python-3.11.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python311 || goto :error
python-3.12.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python312 || goto :error
python-3.13.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python313 || goto :error

:: fix msvcc version for all python3
pwsh -command "(Get-Content C:\Python37\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1900'':' | Out-File C:\Python37\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python38\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1916'':' | Out-File C:\Python38\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python39\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1927'':' | Out-File C:\Python39\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python310\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1929'':' | Out-File C:\Python310\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python311\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1934'':' | Out-File C:\Python311\Lib\distutils\cygwinccompiler.py"


:: fix msvc runtime library for all python
pwsh -command "(Get-Content C:\Python37\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python37\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python38\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python38\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python39\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python39\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python310\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python310\Lib\distutils\cygwinccompiler.py"
pwsh -command "(Get-Content C:\Python311\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python311\Lib\distutils\cygwinccompiler.py"

:: install numpy
C:\Python37\python.exe -m pip install numpy==1.14.6 cython || goto :error
C:\Python38\python.exe -m pip install numpy==1.17.5 cython || goto :error
C:\Python39\python.exe -m pip install numpy==1.19.3 cython || goto :error
C:\Python310\python.exe -m pip install numpy==1.21.3 cython || goto :error
C:\Python311\python.exe -m pip install numpy==1.23.5 cython || goto :error
Expand Down
6 changes: 0 additions & 6 deletions ci/win_test_installer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,20 @@ echo %NEURONHOME%
if not exist association.hoc.out (start /wait /REALTIME %cd%\ci\association.hoc)

:: test all pythons
C:\Python37\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python38\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python312\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python313\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"

:: install oldest supported numpy
C:\Python37\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python38\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python39\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python310\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python311\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python312\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error
C:\Python313\python.exe -m pip install -r packaging/python/oldest_numpy_requirements.txt || goto :error

:: test all pythons again
C:\Python37\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python38\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
Expand Down
2 changes: 0 additions & 2 deletions ci/win_test_installer_wo_rxd.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ echo %NEURONHOME%
if not exist association.hoc.out (start /wait /REALTIME %cd%\ci\association.hoc)

:: test all pythons
C:\Python37\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python38\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y"
Expand Down

0 comments on commit b165176

Please sign in to comment.