Skip to content

Commit

Permalink
COMP: Update list of python requirements to support python 3.9 instea…
Browse files Browse the repository at this point in the history
…d of 3.6

This commit fixes the following build error:

```
  Command failed: 1

   '/Volumes/D/P/S-0-build/python-install/bin/PythonSlicer' '-m' 'pip' 'install' '--require-hashes' '-r' '/.../ShapeVariationAnalyzer-build/python-ShapeVariationAnalyzer-requirements-requirements.txt' '--prefix' '/.../ShapeVariationAnalyzer-build/python-packages-install'

  See also

    /.../ShapeVariationAnalyzer-build/python-ShapeVariationAnalyzer-requirements-prefix/src/python-ShapeVariationAnalyzer-requirements-stamp/python-ShapeVariationAnalyzer-requirements-install-*.log
```

The updates was performed following these steps using the updated
"python_package_updater.py" script assocated with PR Slicer/Slicer#6300:

```
# Set common variables
SLICER_SOURCE_DIR=~/Projects/Slicer
SLICER_DIR=~/Projects/Slicer-Release/Slicer-build
PYTHONSLICER_EXECUTABLE=${SLICER_DIR}/../python-install/bin/PythonSlicer

EXTENSION_SOURCE_DIR=/home/jcfr/Projects/ShapeVariationAnalyzer
EXTENSION_BINARY_DIR=/home/jcfr/Projects/ShapeVariationAnalyzer-Release

# Install packages into the prefix
PYTHON_INSTALL_PREFIX=${EXTENSION_BINARY_DIR}/python-packages-install
${PYTHONSLICER_EXECUTABLE} -m pip install --prefix ${PYTHON_INSTALL_PREFIX} scikit_learn

# Update extension external projects
UPDATER_SCRIPT=${SLICER_SOURCE_DIR}/Utilities/Scripts/python_package_updater.py


${PYTHONSLICER_EXECUTABLE} ${UPDATER_SCRIPT} \
  -s ${EXTENSION_SOURCE_DIR}/SuperBuild      \
  --from-installed-packages                  \
  --path ${PYTHON_INSTALL_PREFIX}/lib/python3.9/site-packages
```

This addresses the issue initiated here: #55

Co-authored-by: James Fishbaugh <james.fishbaugh@kitware.com>
  • Loading branch information
jcfr and jamesfishbaugh committed Apr 6, 2022
1 parent b9ca3c9 commit 03a9b78
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,25 @@ if(NOT Slicer_USE_SYSTEM_${proj})
set(requirements_file ${CMAKE_BINARY_DIR}/${proj}-requirements.txt)
file(WRITE ${requirements_file} [===[
# [joblib]
joblib==0.16.0 --hash=sha256:d348c5d4ae31496b2aa060d6d9b787864dd204f9480baaa52d18850cb43e9f49
joblib==1.1.0 --hash=sha256:f21f109b3c7ff9d95f8387f752d0d9c34a02aa2f7060c2135f465da0e5160ff6
# [/joblib]
# [threadpoolctl]
threadpoolctl==2.1.0 --hash=sha256:38b74ca20ff3bb42caca8b00055111d74159ee95c4370882bbff2b93d24da725
threadpoolctl==3.1.0 --hash=sha256:8b99adda265feb6773280df41eece7b2e6561b772d21ffd52e372f999024907b
# [/threadpoolctl]
# [scikit-learn]
# Hashes correspond to the following packages:
# - scikit_learn-0.23.1-cp36-cp36m-win_amd64.whl
# - scikit_learn-0.23.1-cp36-cp36m-macosx_10_9_x86_64.whl
# - scikit_learn-0.23.1-cp36-cp36m-manylinux1_x86_64.whl
scikit-learn==0.23.1 --hash=sha256:e585682e37f2faa81ad6cd4472fff646bf2fd0542147bec93697a905db8e6bd2 \
--hash=sha256:058d213092de4384710137af1300ed0ff030b8c40459a6c6f73c31ccd274cc39 \
--hash=sha256:e9879ba9e64ec3add41bf201e06034162f853652ef4849b361d73b0deb3153ad
# - scikit_learn-1.0.2-cp39-cp39-macosx_10_13_x86_64.whl
# - scikit_learn-1.0.2-cp39-cp39-macosx_12_0_arm64.whl
# - scikit_learn-1.0.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
# - scikit_learn-1.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
# - scikit_learn-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
# - scikit_learn-1.0.2-cp39-cp39-win_amd64.whl
scikit-learn==1.0.2 --hash=sha256:a90b60048f9ffdd962d2ad2fb16367a87ac34d76e02550968719eb7b5716fd10 \
--hash=sha256:7a93c1292799620df90348800d5ac06f3794c1316ca247525fa31169f6d25855 \
--hash=sha256:55f2f3a8414e14fbee03782f9fe16cca0f141d639d2b1c1a36779fa069e1db57 \
--hash=sha256:80095a1e4b93bd33261ef03b9bc86d6db649f988ea4dbcf7110d0cded8d7213d \
--hash=sha256:ff746a69ff2ef25f62b36338c615dd15954ddc3ab8e73530237dd73235e76d62 \
--hash=sha256:b54a62c6e318ddbfa7d22c383466d38d2ee770ebdb5ddb668d56a099f6eaf75f
# [/scikit-learn]
]===])

Expand Down

0 comments on commit 03a9b78

Please sign in to comment.