Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: LTS package build #3328

Merged
merged 5 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 28 additions & 81 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ jobs:
image: ubuntu-2004:202104-01
working_directory: /tmp/ds005
environment:
- FS_LICENSE: /tmp/fslicense/license.txt
- DATASET: ds005
FS_LICENSE: /tmp/fslicense/license.txt
DATASET: ds005
steps:
- checkout:
path: /home/circleci/src/fmriprep
Expand Down Expand Up @@ -583,8 +583,8 @@ jobs:
image: ubuntu-2004:202104-01
working_directory: /tmp/ds054
environment:
- FS_LICENSE: /tmp/fslicense/license.txt
- DATASET: ds054
FS_LICENSE: /tmp/fslicense/license.txt
DATASET: ds054
steps:
- checkout:
path: /home/circleci/src/fmriprep
Expand Down Expand Up @@ -751,8 +751,8 @@ jobs:
image: ubuntu-2004:202104-01
working_directory: /tmp/ds210
environment:
- FS_LICENSE: /tmp/fslicense/license.txt
- DATASET: ds210
FS_LICENSE: /tmp/fslicense/license.txt
DATASET: ds210
steps:
- checkout:
path: /home/circleci/src/fmriprep
Expand Down Expand Up @@ -1015,107 +1015,54 @@ jobs:

test_deploy_pypi:
docker:
- image: circleci/python:3.8.5
- image: cimg/python:3.7
working_directory: /tmp/src/fmriprep
steps:
- checkout
- run:
name: Build fMRIPrep
name: Inject version into source directory and wrapper source
command: |
python -m pip install --user twine # For use in checking distributions
THISVERSION=$( python get_version.py )
THISVERSION=${THISVERSION%.dirty*}
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
virtualenv --python=python build
source build/bin/activate
pip install --upgrade "pip>=19.1" numpy
echo "${CIRCLE_TAG:-$THISVERSION}" > fmriprep/VERSION
python setup.py sdist
python -m pip wheel --no-deps -w dist/ .
- store_artifacts:
path: /tmp/src/fmriprep/dist
echo "${THISVERSION}" > fmriprep/VERSION
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${THISVERSION}'/" wrapper/fmriprep_docker.py
- run:
name: Check sdist distribution
command: |
THISVERSION=$( python get_version.py )
THISVERSION=${THISVERSION%.dirty*}
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python -m twine check dist/fmriprep*.tar.gz
virtualenv --python=python sdist
source sdist/bin/activate
python -m pip install --upgrade "pip>=19.1" numpy
python -m pip install dist/fmriprep*.tar.gz
which fmriprep | grep sdist\\/bin
INSTALLED_VERSION=$(fmriprep --version)
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
INSTALLED_VERSION=${INSTALLED_VERSION#*"fMRIPrep v"}
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "$THISVERSION"
- run:
name: Check wheel distribution
command: |
THISVERSION=$( python get_version.py )
THISVERSION=${THISVERSION%.dirty*}
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python -m twine check dist/fmriprep*.whl
virtualenv --python=python wheel
source wheel/bin/activate
python -m pip install dist/fmriprep*.whl
which fmriprep | grep wheel\\/bin
INSTALLED_VERSION=$(fmriprep --version)
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
INSTALLED_VERSION=${INSTALLED_VERSION#*"fMRIPrep v"}
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "$THISVERSION"
- run:
name: Build fmriprep-docker
name: Build fMRIPrep
command: |
THISVERSION=$( python get_version.py )
THISVERSION=${THISVERSION%.dirty*}
cd wrapper
virtualenv --python=python build
source build/bin/activate
python -m pip install --upgrade "pip>=19.1"
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" fmriprep_docker.py
python setup.py sdist
python -m pip wheel --no-deps -w dist/ .
pipx run build .
pipx run build wrapper/
- store_artifacts:
path: /tmp/src/fmriprep/dist
- store_artifacts:
path: /tmp/src/fmriprep/wrapper/dist
- run:
name: Twine check fMRIPrep
command: pipx run twine check dist/* wrapper/dist/*

deploy_pypi:
docker:
- image: circleci/python:3.8.5
- image: cimg/python:3.7
working_directory: /tmp/src/fmriprep
steps:
- checkout
- run:
name: Build fMRIPrep
name: Inject version into source directory and wrapper source
command: |
THISVERSION=$( python get_version.py )
virtualenv --python=python build
source build/bin/activate
python -m pip install --upgrade "pip>=19.1"
echo "${CIRCLE_TAG:-$THISVERSION}" > fmriprep/VERSION
python setup.py sdist
python -m pip wheel --no-deps -w dist/ .
THISVERSION=${THISVERSION%.dirty*}
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
echo "${THISVERSION}" > fmriprep/VERSION
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${THISVERSION}'/" wrapper/fmriprep_docker.py
- run:
name: Build fmriprep-docker
name: Build fMRIPrep
command: |
THISVERSION=$( python get_version.py )
cd wrapper
virtualenv --python=python build
source build/bin/activate
python -m pip install --upgrade "pip>=19.1"
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" fmriprep_docker.py
python setup.py sdist
python -m pip wheel --no-deps -w dist/ .
pipx run build .
pipx run build wrapper/
- run:
name: Upload packages to PyPI
command: |
python -m pip install --user twine
python -m twine upload dist/fmriprep* wrapper/dist/fmriprep*
pipx run twine upload dist/fmriprep* wrapper/dist/fmriprep*

deployable:
docker:
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ ENV PATH="/usr/local/miniconda/bin:$PATH" \
PYTHONNOUSERSITE=1

COPY docker/files/environment.yml /usr/local/etc/environment.yml
COPY docker/files/repo-anaconda-com-chain.pem /usr/local/etc/repo-anaconda-com-chain.pem

RUN conda config --set ssl_verify /usr/local/etc/repo-anaconda-com-chain.pem

# Installing precomputed python packages
RUN conda env update -n base -f /usr/local/etc/environment.yml; sync && \
Expand Down
78 changes: 78 additions & 0 deletions docker/files/repo-anaconda-com-chain.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
-----BEGIN CERTIFICATE-----
MIIDgzCCAwigAwIBAgISBFll13cqbRr9DwiBsS+8V7uzMAoGCCqGSM49BAMDMDIx
CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF
NjAeFw0yNDA2MjYwODU5NDdaFw0yNDA5MjQwODU5NDZaMBwxGjAYBgNVBAMTEXJl
cG8uYW5hY29uZGEuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEiwInsAKM
aG0UR4O2o+r3/PmDA/STFMLz5BWmNv8kkW0stJ725355cDWxzqs5CAN4IqG+134e
ORBIgH3wQV33FqOCAhIwggIOMA4GA1UdDwEB/wQEAwIHgDAdBgNVHSUEFjAUBggr
BgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQU9fkzh3cq
D3IKq8IA1GyI+UVTVJswHwYDVR0jBBgwFoAUkydGmAOpUWiOmNbEQkjbI79YlNIw
VQYIKwYBBQUHAQEESTBHMCEGCCsGAQUFBzABhhVodHRwOi8vZTYuby5sZW5jci5v
cmcwIgYIKwYBBQUHMAKGFmh0dHA6Ly9lNi5pLmxlbmNyLm9yZy8wHAYDVR0RBBUw
E4IRcmVwby5hbmFjb25kYS5jb20wEwYDVR0gBAwwCjAIBgZngQwBAgEwggEDBgor
BgEEAdZ5AgQCBIH0BIHxAO8AdgA/F0tP1yJHWJQdZRyEvg0S7ZA3fx+FauvBvyiF
7PhkbgAAAZBT/K+xAAAEAwBHMEUCIQC6pHZ3p8XWEgApslV+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