Skip to content

Commit

Permalink
CI: Simplify pyenv usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd authored and effigies committed Mar 4, 2024
1 parent 56e6699 commit 30f1f05
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _machine_defaults: &machine_defaults

_python_defaults: &python_defaults
docker:
- image: cimg/python:3.10.9
- image: cimg/python:3.12
working_directory: /tmp/src/fmriprep

_docker_auth: &docker_auth
Expand Down Expand Up @@ -80,9 +80,7 @@ _check_skip_job: &check_skip_job
_setup_fmriprep_docker: &setup_fmriprep_docker
name: Install fMRIPrep's docker wrapper
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
pip install --upgrade pip
pip install --upgrade /tmp/src/fmriprep/wrapper/
Expand Down Expand Up @@ -132,9 +130,7 @@ jobs:
name: Build Docker image
no_output_timeout: 60m
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
pip install hatch
# Get version, update files
THISVERSION=$( hatch version )
Expand Down Expand Up @@ -174,9 +170,7 @@ jobs:
name: Build Docker image
no_output_timeout: 60m
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
pip install hatch
# Get version, update files.
THISVERSION=$( hatch version )
Expand All @@ -199,9 +193,6 @@ jobs:
- run:
name: Check Docker image
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
# Get version, update files.
THISVERSION=$( hatch version )
BUILT_VERSION=$( docker run --rm nipreps/fmriprep:latest --version )
Expand Down Expand Up @@ -384,17 +375,12 @@ jobs:
- run:
name: Build fmriprep-docker wheel
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
pip install --upgrade pip build
python -m build wrapper/
- run:
name: Install and test fmriprep-docker (Python 3)
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
echo -n "Python version: "
python --version
pip install --upgrade wrapper/
Expand All @@ -405,9 +391,7 @@ jobs:
- run:
name: Install and test fmriprep-docker (Python 2)
command: |
export PY2=$(pyenv versions | grep '2\.' |
sed -e 's/.* 2\./2./' -e 's/ .*//')
pyenv local $PY2
pyenv local 2.7
echo -n "Python version: "
python --version
pip install --upgrade "pip<21"
Expand Down

0 comments on commit 30f1f05

Please sign in to comment.