Skip to content

Commit

Permalink
Bump min Python version from 3.8 to 3.9 (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran authored Nov 19, 2024
1 parent 96299cb commit a851a1b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nmodl-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- release/**

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
DESIRED_CMAKE_VERSION: 3.15.0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nmodl-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
BUILD_TYPE: Release
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
DESIRED_CMAKE_VERSION: 3.15.0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ endif()
# Find required python packages
# =============================================================================
message(STATUS "CHECKING FOR PYTHON")
find_package(Python 3.8 REQUIRED COMPONENTS Interpreter)
find_package(Python 3.9 REQUIRED COMPONENTS Interpreter)
cpp_cc_strip_python_shims(EXECUTABLE "${PYTHON_EXECUTABLE}" OUTPUT PYTHON_EXECUTABLE)

# =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ support is necessary. Make sure you have following packages available:
- flex (>=2.6)
- bison (>=3.0)
- CMake (>=3.15)
- Python (>=3.8)
- Python (>=3.9)
- Python packages : jinja2 (>=2.10), pyyaml (>=3.13), pytest (>=4.0.0),
sympy (>=1.3), textwrap

Expand Down
16 changes: 7 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ stages:
sudo apt-add-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y g++-9 flex bison libfl-dev cython libx11-dev libxcomposite-dev libncurses-dev mpich
sudo apt-get install -y python3.8 python3.8-dev python3.8-venv ninja-build
sudo apt-get install -y python3.9 python3.9-dev python3.9-venv ninja-build
sudo apt-get remove -y python3-importlib-metadata
python3.8 -m pip install --upgrade pip setuptools
python3.8 -m pip install --user -r requirements.txt
python3.9 -m pip install --upgrade pip setuptools
python3.9 -m pip install --user -r requirements.txt
# we manually get version 3.15.0 to make sure that changes in the cmake
# files do not require unsupported versions of cmake in our package.
wget --quiet --output-document=- "https://github.com/Kitware/CMake/releases/download/$CMAKE_VER/$CMAKE_PKG.tar.gz" | tar xzpf -
Expand All @@ -101,7 +101,7 @@ stages:
mkdir -p $(Build.Repository.LocalPath)/build
cd $(Build.Repository.LocalPath)/build
cmake --version
cmake .. -DPYTHON_EXECUTABLE=$(which python3.8) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=Release
cmake .. -DPYTHON_EXECUTABLE=$(which python3.9) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=Release
make -j 2
if [ $? -ne 0 ]
then
Expand All @@ -121,7 +121,7 @@ stages:
mkdir nrn/build
cd nrn/build
cmake --version
cmake .. -DNRN_ENABLE_CORENEURON=ON -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_RX3D=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_TESTS=ON -DCORENRN_ENABLE_NMODL=ON -DCORENRN_NMODL_DIR=$HOME/nmodl -DPYTHON_EXECUTABLE=$(which python3.8) -DCORENRN_NMODL_FLAGS="sympy --analytic"
cmake .. -DNRN_ENABLE_CORENEURON=ON -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_RX3D=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_TESTS=ON -DCORENRN_ENABLE_NMODL=ON -DCORENRN_NMODL_DIR=$HOME/nmodl -DPYTHON_EXECUTABLE=$(which python3.9) -DCORENRN_NMODL_FLAGS="sympy --analytic"
make -j 2
if [ $? -ne 0 ]
then
Expand Down Expand Up @@ -215,7 +215,7 @@ stages:
displayName: "Set wheel tag"
- script: |
echo "##vso[task.setvariable variable=CIBW_BUILD;]cp38* cp312*"
echo "##vso[task.setvariable variable=CIBW_BUILD;]cp39* cp312*"
echo "Build identifiers: $CIBW_BUILD"
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
displayName: "Set build identifiers"
Expand Down Expand Up @@ -260,7 +260,7 @@ stages:
displayName: "Set wheel tag"
- script: |
echo "##vso[task.setvariable variable=CIBW_BUILD;]cp38* cp312*"
echo "##vso[task.setvariable variable=CIBW_BUILD;]cp39* cp312*"
echo "Build identifiers: $CIBW_BUILD"
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
displayName: "Set build identifiers"
Expand Down Expand Up @@ -291,8 +291,6 @@ stages:
strategy:
matrix:
${{ if eq(variables.buildWheel, True) }}:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [
"importlib-resources;python_version<'3.9'",
]
scripts = {nmodl = "nmodl._binwrapper:main"}
requires-python = ">=3.8"
requires-python = ">=3.9"

optional-dependencies.test = ["pytest>=3.3.0", "pytest-cov", "numpy", "scipy"]
optional-dependencies.docs = [
Expand Down Expand Up @@ -76,4 +76,4 @@ environment = { PATH = "/nmodlwheel/flex/bin:/nmodlwheel/bison/bin:$PATH" }
test-command = "true"

[tool.cibuildwheel.windows]
environment = { SKBUILD_CMAKE_ARGS = "-DNMODL_BUILD_WHEEL=ON;-DFLEX_INCLUDE_PATH=C:/ProgramData/chocolatey/lib/winflexbison3/tools" }
environment = { SKBUILD_CMAKE_ARGS = "-DNMODL_BUILD_WHEEL=ON;-DFLEX_INCLUDE_PATH=C:/ProgramData/chocolatey/lib/winflexbison3/tools" }

0 comments on commit a851a1b

Please sign in to comment.