From 075c1759f93cbd72cc373420c3bc7b231fa02f06 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 14 Sep 2023 08:48:02 +0000 Subject: [PATCH 01/53] Add build scripts for vtk py311 --- .../linux_64_python3.11.____cpython.yaml | 47 +++++++++++++++++++ infra/conda/vtk/.scripts/run_docker_build.sh | 6 +-- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml diff --git a/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml new file mode 100644 index 00000000..2a2d32b4 --- /dev/null +++ b/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml @@ -0,0 +1,47 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: +- '2' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +freetype: +- '2' +jsoncpp: +- '1.9' +jpeg: +- '9' +libpng: +- '1.6' +libtiff: +- '4' +libxml2: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +target_platform: +- linux-64 +vtk: +- 7.1.1 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version +zlib: +- '1' diff --git a/infra/conda/vtk/.scripts/run_docker_build.sh b/infra/conda/vtk/.scripts/run_docker_build.sh index c9b98154..b381d3fb 100755 --- a/infra/conda/vtk/.scripts/run_docker_build.sh +++ b/infra/conda/vtk/.scripts/run_docker_build.sh @@ -8,7 +8,7 @@ PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" -docker info +sudo -E docker info HOST_USER_ID=$(id -u) @@ -20,8 +20,8 @@ rm -f "${DONE_CANARY}" UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-False}" -docker pull "${DOCKER_IMAGE}" -docker run --rm -it \ +sudo -E docker pull "${DOCKER_IMAGE}" +sudo -E docker run --rm -it \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ -e CONFIG \ From 1c0635526f66fdd44e01e235b207519a689b5de3 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 14 Sep 2023 08:53:12 +0000 Subject: [PATCH 02/53] Add build config for vtk py311 --- infra/conda/vtk/build-py311.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 infra/conda/vtk/build-py311.sh diff --git a/infra/conda/vtk/build-py311.sh b/infra/conda/vtk/build-py311.sh new file mode 100755 index 00000000..b34129e1 --- /dev/null +++ b/infra/conda/vtk/build-py311.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -xeo pipefail + +export CONFIG='linux_64_python3.11.____cpython' +export UPLOAD_PACKAGES='False' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=4 + +.scripts/run_docker_build.sh From fb33f5f5776f338ea92c84d53af64372759e71e2 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 2 Oct 2023 13:26:22 +0000 Subject: [PATCH 03/53] update vtk yaml config --- .../linux_64_python3.10.____cpython.yaml | 43 +++++++++++++------ .../linux_64_python3.11.____cpython.yaml | 43 +++++++++++++------ infra/conda/vtk/recipe/meta.yaml | 32 +++++++------- 3 files changed, 76 insertions(+), 42 deletions(-) mode change 100644 => 100755 infra/conda/vtk/recipe/meta.yaml diff --git a/infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml index dd24e0ca..fe09c1bb 100644 --- a/infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml @@ -12,14 +12,30 @@ cxx_compiler_version: - '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 -expat: -- '2' fortran_compiler: - gfortran fortran_compiler_version: - '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +expat: +- '2' freetype: - '2' +hdf5: +- '>=1.10,<1.11' jsoncpp: - '1.9' jpeg: @@ -30,18 +46,19 @@ libtiff: - '4' libxml2: - '2' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -target_platform: -- linux-64 +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.17' +sundials: +- '>=3.0,<6.0' vtk: - 7.1.1 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version +xercesc: +- '>=3' zlib: - '1' diff --git a/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml index 2a2d32b4..dfd5c1d3 100644 --- a/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml @@ -12,14 +12,30 @@ cxx_compiler_version: - '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 -expat: -- '2' fortran_compiler: - gfortran fortran_compiler_version: - '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +expat: +- '2' freetype: - '2' +hdf5: +- '>=1.10,<1.13' jsoncpp: - '1.9' jpeg: @@ -30,18 +46,19 @@ libtiff: - '4' libxml2: - '2' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -target_platform: -- linux-64 +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.18' +sundials: +- '>=3.0,<6.0' vtk: - 7.1.1 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version +xercesc: +- '>=3' zlib: - '1' diff --git a/infra/conda/vtk/recipe/meta.yaml b/infra/conda/vtk/recipe/meta.yaml old mode 100644 new mode 100755 index fe32c5cb..48886680 --- a/infra/conda/vtk/recipe/meta.yaml +++ b/infra/conda/vtk/recipe/meta.yaml @@ -58,17 +58,17 @@ requirements: - jsoncpp - expat - glew - - boost-cpp >=1.68,<1.76 - - hdf5 >=1.10,<1.11 + - boost-cpp + - hdf5 - hdf5 * mpi_mpich* - - metis >=4 - - mpich >=3 + - metis + - mpich - mpi4py - - parmetis >=4 - - petsc >=3.12,<3.17 + - parmetis + - petsc - petsc4py - - sundials >=3.0,<6.0 - - xerces-c >=3 + - sundials + - xerces-c - xsd 4.* run: @@ -83,17 +83,17 @@ requirements: - jsoncpp - expat - glew - - boost-cpp >=1.68,<1.76 - - hdf5 >=1.10,<1.11 + - boost-cpp + - hdf5 - hdf5 * mpi_mpich* - - metis >=4 - - mpich >=3 + - metis + - mpich - mpi4py - - parmetis >=4 - - petsc >=3.12,<3.17 + - parmetis + - petsc - petsc4py - - sundials >=3.0,<6.0 - - xerces-c >=3 + - sundials + - xerces-c - xsd 4.* test: From 0acca0f9ae34b90bbd956951b5c22872c605c9ce Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 2 Oct 2023 13:50:43 +0000 Subject: [PATCH 04/53] Add vtk 7 patches for hdf5 1.12 --- infra/conda/vtk/recipe/meta.yaml | 2 ++ infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch | 11 +++++++++++ infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch create mode 100644 infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch diff --git a/infra/conda/vtk/recipe/meta.yaml b/infra/conda/vtk/recipe/meta.yaml index 48886680..71db8717 100755 --- a/infra/conda/vtk/recipe/meta.yaml +++ b/infra/conda/vtk/recipe/meta.yaml @@ -16,6 +16,8 @@ source: patches: - patches/vtk7.1.1.patch - patches/netcdf4-nc_type.patch + - patches/netcdf4-nc4file.patch + - patches/netcdf4-nc4hdf.patch build: number: {{ build }} diff --git a/infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch b/infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch new file mode 100644 index 00000000..b1a50faa --- /dev/null +++ b/infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c ++++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c +@@ -8,6 +8,8 @@ + COPYRIGHT file for copying and redistribution conditions. + */ + ++#define H5_USE_110_API ++ + #include "nc4internal.h" + #include "nc.h" + #include diff --git a/infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch b/infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch new file mode 100644 index 00000000..197dc77a --- /dev/null +++ b/infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c ++++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c +@@ -13,6 +13,8 @@ + $Id: nc4hdf.c,v 1.273 2010/05/27 21:34:14 dmh Exp $ + */ + ++#define H5_USE_110_API ++ + #include "config.h" + #include "nc4internal.h" + #include From 5273349eed1f54d91fb88ecab44ef3f47b22e755 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 2 Oct 2023 14:03:58 +0000 Subject: [PATCH 05/53] De-escalate vtk build docker commands --- infra/conda/vtk/.scripts/run_docker_build.sh | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/infra/conda/vtk/.scripts/run_docker_build.sh b/infra/conda/vtk/.scripts/run_docker_build.sh index b381d3fb..efae3829 100755 --- a/infra/conda/vtk/.scripts/run_docker_build.sh +++ b/infra/conda/vtk/.scripts/run_docker_build.sh @@ -8,7 +8,7 @@ PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" -sudo -E docker info +docker info HOST_USER_ID=$(id -u) @@ -20,18 +20,18 @@ rm -f "${DONE_CANARY}" UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-False}" -sudo -E docker pull "${DOCKER_IMAGE}" -sudo -E docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG \ - -e UPLOAD_PACKAGES \ - -e BUILD_WITH_CONDA_DEBUG \ - -e CPU_COUNT \ - -e RECIPE_NAME \ - -e HOST_USER_ID \ - "${DOCKER_IMAGE}" \ - bash \ - "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" +docker pull "${DOCKER_IMAGE}" +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG \ + -e UPLOAD_PACKAGES \ + -e BUILD_WITH_CONDA_DEBUG \ + -e CPU_COUNT \ + -e RECIPE_NAME \ + -e HOST_USER_ID \ + "${DOCKER_IMAGE}" \ + bash \ + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" test -f "${DONE_CANARY}" From 3d23a07a8074fcca0e57ef4bd2fbd0ad9854db55 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Mon, 2 Oct 2023 17:12:13 +0000 Subject: [PATCH 06/53] Update pychaste conda build for py311 --- .../linux_64_python3.10.____cpython.yaml | 21 +++++++- .../linux_64_python3.11.____cpython.yaml | 50 +++++++++++++++++++ infra/conda/chaste/build-py311.sh | 12 +++++ infra/conda/chaste/recipe/meta.yaml | 38 +++++++------- 4 files changed, 101 insertions(+), 20 deletions(-) create mode 100755 infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml create mode 100755 infra/conda/chaste/build-py311.sh diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml index 3ac9c2ca..2464f8d8 100755 --- a/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml @@ -7,7 +7,7 @@ channel_sources: channel_targets: - pychaste main chaste: -- 3.4.4 +- 2023.10.dev1 cxx_compiler: - gxx cxx_compiler_version: @@ -29,3 +29,22 @@ target_platform: zip_keys: - - cxx_compiler_version - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +hdf5: +- '>=1.10,<1.11' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.17' +sundials: +- '>=3.0,<6.0' +vtk: +- '7.1.1' +xercesc: +- '>=3' diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml new file mode 100755 index 00000000..ce33b0d8 --- /dev/null +++ b/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml @@ -0,0 +1,50 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +chaste: +- 2023.10.dev1 +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +hdf5: +- '>=1.10,<1.13' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.18' +sundials: +- '>=3.0,<6.0' +vtk: +- '7.1.1' +xercesc: +- '>=3' diff --git a/infra/conda/chaste/build-py311.sh b/infra/conda/chaste/build-py311.sh new file mode 100755 index 00000000..ffdd978e --- /dev/null +++ b/infra/conda/chaste/build-py311.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -xeo pipefail + +export CONFIG='linux_64_python3.11.____cpython' +export CHASTE_GIT_BRANCH='develop' +export PYCHASTE_GIT_BRANCH='develop' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=2 + +.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/recipe/meta.yaml b/infra/conda/chaste/recipe/meta.yaml index bec4cee1..a7d05406 100644 --- a/infra/conda/chaste/recipe/meta.yaml +++ b/infra/conda/chaste/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "3.4.4" %} +{% set version = "2023.10.dev1" %} {% set build = 0 %} {% set build_string = "py{}h{}_{}".format(CONDA_PY, PKG_HASH, build) %} @@ -31,33 +31,33 @@ requirements: host: - python - - boost-cpp >=1.68,<1.76 - - hdf5 >=1.10,<1.11 + - boost-cpp + - hdf5 - hdf5 * mpi_mpich* - - metis >=4 - - mpich >=3 - - parmetis >=4 - - petsc >=3.12,<3.17 + - metis + - mpich + - parmetis + - petsc - petsc4py - - sundials >=3.0,<6.0 - - vtk 7.1.1 - - xerces-c >=3 + - sundials + - vtk + - xerces-c - xsd 4.* - xvfbwrapper run: - python - - boost-cpp >=1.68,<1.76 - - hdf5 >=1.10,<1.11 + - boost-cpp + - hdf5 - hdf5 * mpi_mpich* - - metis >=4 - - mpich >=3 - - parmetis >=4 - - petsc >=3.12,<3.17 + - metis + - mpich + - parmetis + - petsc - petsc4py - - sundials >=3.0,<6.0 - - vtk 7.1.1 - - xerces-c >=3 + - sundials + - vtk + - xerces-c - xsd 4.* - xvfbwrapper - matplotlib From 30cd482f249069ee2e393cd9b1c6d537a67b25f3 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 20 Oct 2023 12:36:58 +0000 Subject: [PATCH 07/53] Update vtk build scripts --- infra/conda/vtk/.scripts/build_steps.sh | 11 ++------- infra/conda/vtk/.scripts/run_docker_build.sh | 26 +++++++++----------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/infra/conda/vtk/.scripts/build_steps.sh b/infra/conda/vtk/.scripts/build_steps.sh index e288141d..f5198b92 100755 --- a/infra/conda/vtk/.scripts/build_steps.sh +++ b/infra/conda/vtk/.scripts/build_steps.sh @@ -26,6 +26,7 @@ mamba update --update-specs --yes --quiet --channel conda-forge \ conda config --add channels bioconda conda config --add channels conda-forge +conda config --add channels pychaste conda config --env --set show_channel_urls true conda config --env --set auto_update_conda false conda config --env --set add_pip_as_python_dependency false @@ -49,9 +50,7 @@ conda info conda config --env --show-sources conda list --show-channel-urls -/usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +/usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then conda debug "${RECIPE_ROOT}" -m "${CONFIG_FILE}" @@ -59,12 +58,6 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else conda mambabuild "${RECIPE_ROOT}" -m "${CONFIG_FILE}" - - # if [[ "${UPLOAD_PACKAGES}" != 'False' ]]; then - # anaconda -q --show-traceback -t ${anaconda_token} upload \ - # -u 'pychaste' \ - # ${CONDA_BLD_PATH}/linux-64/${CONFIG}.conda - # fi fi touch "${CONDA_BLD_PATH}/conda-forge-build-done-${CONFIG}" diff --git a/infra/conda/vtk/.scripts/run_docker_build.sh b/infra/conda/vtk/.scripts/run_docker_build.sh index efae3829..abab2bd9 100755 --- a/infra/conda/vtk/.scripts/run_docker_build.sh +++ b/infra/conda/vtk/.scripts/run_docker_build.sh @@ -2,15 +2,10 @@ set -xeo pipefail -THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" - FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" -docker info - -HOST_USER_ID=$(id -u) +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" mkdir -p "${ARTIFACTS}" @@ -18,20 +13,21 @@ mkdir -p "${ARTIFACTS}" DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" rm -f "${DONE_CANARY}" -UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-False}" +docker info +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + docker run --rm -it \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG \ - -e UPLOAD_PACKAGES \ - -e BUILD_WITH_CONDA_DEBUG \ - -e CPU_COUNT \ - -e RECIPE_NAME \ - -e HOST_USER_ID \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ "${DOCKER_IMAGE}" \ - bash \ - "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" test -f "${DONE_CANARY}" From d5c909bd539b69bb8209cc8f5bfc7360ea721b57 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 20 Oct 2023 12:39:22 +0000 Subject: [PATCH 08/53] Update conda build script --- .../conda/chaste/.scripts/run_docker_build.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/infra/conda/chaste/.scripts/run_docker_build.sh b/infra/conda/chaste/.scripts/run_docker_build.sh index dae21012..39028d19 100755 --- a/infra/conda/chaste/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/.scripts/run_docker_build.sh @@ -19,15 +19,16 @@ DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" docker pull "${DOCKER_IMAGE}" export HOST_USER_ID=$(id -u) -docker run \ - --mount type=bind,source="${RECIPE_ROOT}",target=/home/conda/recipe_root \ - --mount type=bind,source="${FEEDSTOCK_ROOT}",target=/home/conda/feedstock_root \ - -e CONFIG \ - -e CHASTE_GIT_BRANCH \ - -e PYCHASTE_GIT_BRANCH \ - -e BUILD_WITH_CONDA_DEBUG \ - -e CPU_COUNT \ - -e HOST_USER_ID \ + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ + -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" From dbd273cf02e14a8f893ce061ce8f18f43e3b7009 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:18:48 +0000 Subject: [PATCH 09/53] #42 add yaml for python 3.8 to 3.11 --- .../linux_64_python3.10.____cpython.yaml | 2 +- .../linux_64_python3.11.____cpython.yaml | 2 +- .../linux_64_python3.8.____cpython.yaml | 50 +++++++++++++++++++ .../linux_64_python3.9.____cpython.yaml | 50 +++++++++++++++++++ 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100755 infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml create mode 100755 infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml index 2464f8d8..3dfeee0d 100755 --- a/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml @@ -7,7 +7,7 @@ channel_sources: channel_targets: - pychaste main chaste: -- 2023.10.dev1 +- 2024.01 cxx_compiler: - gxx cxx_compiler_version: diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml index ce33b0d8..e1a6f83a 100755 --- a/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml @@ -7,7 +7,7 @@ channel_sources: channel_targets: - pychaste main chaste: -- 2023.10.dev1 +- 2024.01 cxx_compiler: - gxx cxx_compiler_version: diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml new file mode 100755 index 00000000..22f91997 --- /dev/null +++ b/infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml @@ -0,0 +1,50 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +chaste: +- 2024.01 +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +hdf5: +- '>=1.10,<1.11' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.17' +sundials: +- '>=3.0,<6.0' +vtk: +- '7.1.1' +xercesc: +- '>=3' diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml new file mode 100755 index 00000000..397c8704 --- /dev/null +++ b/infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml @@ -0,0 +1,50 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +chaste: +- 2024.01 +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +hdf5: +- '>=1.10,<1.11' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.17' +sundials: +- '>=3.0,<6.0' +vtk: +- '7.1.1' +xercesc: +- '>=3' From d1ac8443eda7de036b4e19cfb396ec74d2ed705e Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:25:02 +0000 Subject: [PATCH 10/53] #42 update setup.py --- src/python/setup.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/python/setup.py b/src/python/setup.py index b6cb4726..7e1df15a 100644 --- a/src/python/setup.py +++ b/src/python/setup.py @@ -41,7 +41,7 @@ def has_ext_modules(self): setup( name = "chaste", - version = "2019.1", + version = "2024.1", packages = find_packages(), package_data={ @@ -67,19 +67,24 @@ def has_ext_modules(self): zip_safe = False, # Project Metadata - author = "Chaste Team, University of Oxford", - author_email = "grogan@maths.ox.ac.uk", + author = "Chaste Developers", + author_email = "chaste-users@maillist.ox.ac.uk", description = "Python bindings for Chaste, a general purpose simulation package for computational biology.", license = "BSD-3-Clause", keywords = "cancer developmental biology electrophysiology scientific", classifiers=[ - 'Development Status :: 1 - Planning', + "Development Status :: 4 - Beta", 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering', - 'Operating System :: Unix', + "Operating System :: POSIX", 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3.10', + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", ], distclass=BinaryDistribution From 3d1c41f11580d3e154007c3f5732d65f8d5199bc Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:29:20 +0000 Subject: [PATCH 11/53] #42 add yaml for python 3.12 --- .../linux_64_python3.12.____cpython.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml b/infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml new file mode 100755 index 00000000..cd1f1bde --- /dev/null +++ b/infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml @@ -0,0 +1,50 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +chaste: +- 2024.01 +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +hdf5: +- '>=1.10,<1.13' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.18' +sundials: +- '>=3.0,<6.0' +vtk: +- '7.1.1' +xercesc: +- '>=3' From 3c221c4856ff51d0197cb5a544247983532f8c74 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:33:05 +0000 Subject: [PATCH 12/53] #42 remove unused custom conda builds --- infra/conda/4suite-xml/build.sh | 9 ---- infra/conda/4suite-xml/meta.yaml | 56 ---------------------- infra/conda/amara/bld.bat | 8 ---- infra/conda/amara/build.sh | 9 ---- infra/conda/amara/meta.yaml | 59 ----------------------- infra/conda/boost/bld.bat | 37 --------------- infra/conda/boost/build.sh | 31 ------------- infra/conda/boost/meta.yaml | 23 --------- infra/conda/dolfin/build.sh | 38 --------------- infra/conda/dolfin/meta.yaml | 58 ----------------------- infra/conda/fenics/meta.yaml | 19 -------- infra/conda/ffc/build.sh | 12 ----- infra/conda/ffc/dont_run_test.sh | 5 -- infra/conda/ffc/meta.yaml | 53 --------------------- infra/conda/fiat/build.sh | 9 ---- infra/conda/fiat/meta.yaml | 37 --------------- infra/conda/fiat/run_test.sh | 1 - infra/conda/instant/build.sh | 9 ---- infra/conda/instant/meta.yaml | 45 ------------------ infra/conda/instant/run_test.sh | 2 - infra/conda/itk/build.sh | 20 -------- infra/conda/itk/meta.yaml | 23 --------- infra/conda/openmpi/build.sh | 5 -- infra/conda/openmpi/meta.yaml | 35 -------------- infra/conda/openmpi/post-link.sh | 16 ------- infra/conda/openmpi/pre-unlink.sh | 4 -- infra/conda/openmpi/test/helloworld.c | 19 -------- infra/conda/openmpi/test/helloworld.cxx | 22 --------- infra/conda/openmpi/test/helloworld.f08 | 23 --------- infra/conda/openmpi/test/helloworld.f90 | 23 --------- infra/conda/petsc/build.sh | 43 ----------------- infra/conda/petsc/meta.yaml | 30 ------------ infra/conda/petsc/petsc.patch | 12 ----- infra/conda/petsc4py/build.sh | 4 -- infra/conda/petsc4py/meta.yaml | 37 --------------- infra/conda/rdflib/bld.bat | 8 ---- infra/conda/rdflib/build.sh | 9 ---- infra/conda/rdflib/meta.yaml | 62 ------------------------- infra/conda/readline/build.sh | 6 --- infra/conda/readline/meta.yaml | 21 --------- infra/conda/swig/build.sh | 8 ---- infra/conda/swig/meta.yaml | 31 ------------- infra/conda/ufl/build.sh | 9 ---- infra/conda/ufl/meta.yaml | 47 ------------------- infra/conda/ufl/run_test.sh | 2 - infra/conda/vmtk/build.sh | 15 ------ infra/conda/vmtk/meta.yaml | 24 ---------- infra/conda/xerces-c/build.sh | 5 -- infra/conda/xerces-c/meta.yaml | 15 ------ 49 files changed, 1098 deletions(-) delete mode 100644 infra/conda/4suite-xml/build.sh delete mode 100644 infra/conda/4suite-xml/meta.yaml delete mode 100644 infra/conda/amara/bld.bat delete mode 100644 infra/conda/amara/build.sh delete mode 100644 infra/conda/amara/meta.yaml delete mode 100755 infra/conda/boost/bld.bat delete mode 100755 infra/conda/boost/build.sh delete mode 100644 infra/conda/boost/meta.yaml delete mode 100644 infra/conda/dolfin/build.sh delete mode 100644 infra/conda/dolfin/meta.yaml delete mode 100644 infra/conda/fenics/meta.yaml delete mode 100644 infra/conda/ffc/build.sh delete mode 100644 infra/conda/ffc/dont_run_test.sh delete mode 100644 infra/conda/ffc/meta.yaml delete mode 100644 infra/conda/fiat/build.sh delete mode 100644 infra/conda/fiat/meta.yaml delete mode 100644 infra/conda/fiat/run_test.sh delete mode 100644 infra/conda/instant/build.sh delete mode 100644 infra/conda/instant/meta.yaml delete mode 100644 infra/conda/instant/run_test.sh delete mode 100644 infra/conda/itk/build.sh delete mode 100644 infra/conda/itk/meta.yaml delete mode 100644 infra/conda/openmpi/build.sh delete mode 100644 infra/conda/openmpi/meta.yaml delete mode 100644 infra/conda/openmpi/post-link.sh delete mode 100644 infra/conda/openmpi/pre-unlink.sh delete mode 100644 infra/conda/openmpi/test/helloworld.c delete mode 100644 infra/conda/openmpi/test/helloworld.cxx delete mode 100644 infra/conda/openmpi/test/helloworld.f08 delete mode 100644 infra/conda/openmpi/test/helloworld.f90 delete mode 100644 infra/conda/petsc/build.sh delete mode 100644 infra/conda/petsc/meta.yaml delete mode 100644 infra/conda/petsc/petsc.patch delete mode 100644 infra/conda/petsc4py/build.sh delete mode 100644 infra/conda/petsc4py/meta.yaml delete mode 100644 infra/conda/rdflib/bld.bat delete mode 100644 infra/conda/rdflib/build.sh delete mode 100644 infra/conda/rdflib/meta.yaml delete mode 100755 infra/conda/readline/build.sh delete mode 100644 infra/conda/readline/meta.yaml delete mode 100644 infra/conda/swig/build.sh delete mode 100644 infra/conda/swig/meta.yaml delete mode 100644 infra/conda/ufl/build.sh delete mode 100644 infra/conda/ufl/meta.yaml delete mode 100644 infra/conda/ufl/run_test.sh delete mode 100644 infra/conda/vmtk/build.sh delete mode 100644 infra/conda/vmtk/meta.yaml delete mode 100755 infra/conda/xerces-c/build.sh delete mode 100644 infra/conda/xerces-c/meta.yaml diff --git a/infra/conda/4suite-xml/build.sh b/infra/conda/4suite-xml/build.sh deleted file mode 100644 index f80d1571..00000000 --- a/infra/conda/4suite-xml/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install --prefix=$PREFIX - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/4suite-xml/meta.yaml b/infra/conda/4suite-xml/meta.yaml deleted file mode 100644 index 33ec2041..00000000 --- a/infra/conda/4suite-xml/meta.yaml +++ /dev/null @@ -1,56 +0,0 @@ -package: - name: 4suite-xml - version: "1.0.2" - -source: - fn: 4Suite-XML-1.0.2.tar.gz - url: https://pypi.python.org/packages/0e/ae/3c5b4fffb12be7c3a80c99475853349e1cf8477f99051921ea06fbf5e3b9/4Suite-XML-1.0.2.tar.gz - md5: 3ca3db95cb0263ad80beba034d1ff6ea -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - amara = amara:main - # - # Would create an entry point called amara that calls amara.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - run: - - python - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: http://wiki.xml3k.org/Amara2 - license: Apache Software License - summary: 'Library for XML processing in Python' - license_family: Apache - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/amara/bld.bat b/infra/conda/amara/bld.bat deleted file mode 100644 index 9146a4bf..00000000 --- a/infra/conda/amara/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/infra/conda/amara/build.sh b/infra/conda/amara/build.sh deleted file mode 100644 index f80d1571..00000000 --- a/infra/conda/amara/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install --prefix=$PREFIX - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/amara/meta.yaml b/infra/conda/amara/meta.yaml deleted file mode 100644 index 0deadda3..00000000 --- a/infra/conda/amara/meta.yaml +++ /dev/null @@ -1,59 +0,0 @@ -package: - name: amara - version: "1.2.0.2" - -source: - fn: Amara-1.2.0.2.tar.gz - url: https://pypi.python.org/packages/af/0e/e81dfe4b4fb24023207d86e4d4ff418b0e83927f2155ed3552b0e3196846/Amara-1.2.0.2.tar.gz - md5: 79746b8f74b4a996e8e84fc029f9ce89 -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - amara = amara:main - # - # Would create an entry point called amara that calls amara.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - 4suite-xml - - run: - - python - - nose - - 4suite-xml - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: http://wiki.xml3k.org/Amara2 - license: Apache Software License - summary: 'Library for XML processing in Python' - license_family: Apache - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/boost/bld.bat b/infra/conda/boost/bld.bat deleted file mode 100755 index 49071a39..00000000 --- a/infra/conda/boost/bld.bat +++ /dev/null @@ -1,37 +0,0 @@ -:: Set the right msvc version according to Python version -if "%PY_VER%"=="2.7" ( - set MSVC_VER=9.0 - set LIB_VER=90 -) else if "%PY_VER%"=="3.4" ( - set MSVC_VER=10.0 - set LIB_VER=100 -) else ( - set MSVC_VER=14.0 - set LIB_VER=140 -) - -:: Start with bootstrap -call bootstrap.bat -if errorlevel 1 exit 1 - -:: Build step -.\b2 install ^ - --build-dir=buildboost ^ - --prefix=%LIBRARY_PREFIX% ^ - toolset=msvc-%MSVC_VER% ^ - address-model=%ARCH% ^ - variant=release ^ - threading=multi ^ - link=shared ^ - -j%CPU_COUNT% ^ - -s ZLIB_INCLUDE="%LIBRARY_INC%" ^ - -s ZLIB_LIBPATH="%LIBRARY_LIB%" -if errorlevel 1 exit 1 - -:: Install fix-up for a non version-specific boost include -move %LIBRARY_INC%\boost-1_60\boost %LIBRARY_INC% -if errorlevel 1 exit 1 - -:: Move dll's to LIBRARY_BIN -move %LIBRARY_LIB%\*vc%LIB_VER%-mt-1_60.dll "%LIBRARY_BIN%" -if errorlevel 1 exit 1 diff --git a/infra/conda/boost/build.sh b/infra/conda/boost/build.sh deleted file mode 100755 index f9c2c71a..00000000 --- a/infra/conda/boost/build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -x -e - -INCLUDE_PATH="${PREFIX}/include" -LIBRARY_PATH="${PREFIX}/lib" - -if [ "$(uname)" == "Linux" ]; then - ./bootstrap.sh \ - --prefix="${PREFIX}" \ - --without-icu \ - --with-libraries=system,filesystem,serialization,program_options \ - | tee bootstrap.log 2>&1 - - ./b2 -q \ - variant=release \ - address-model="${ARCH}" \ - architecture=x86 \ - debug-symbols=off \ - threading=multi \ - runtime-link=shared \ - link=shared \ - toolset=gcc \ - cxxflags=-std=c++11 \ - include="${INCLUDE_PATH}" \ - linkflags="-L${LIBRARY_PATH}" \ - --layout=system \ - -j"${CPU_COUNT}" \ - -s NO_BZIP2=1 \ - install | tee b2.log 2>&1 -fi diff --git a/infra/conda/boost/meta.yaml b/infra/conda/boost/meta.yaml deleted file mode 100644 index fab5c248..00000000 --- a/infra/conda/boost/meta.yaml +++ /dev/null @@ -1,23 +0,0 @@ -package: - name: boost - version: 1.63.0 - -source: - fn: boost_1_63_0.tar.bz2 - url: http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2 - -build: - features: - - vc9 [win and py27] - - vc10 [win and py34] - - vc14 [win and py35] - number: 0 - -requirements: - build: - - python - -about: - home: http://www.boost.org/ - license: Boost-1.0 - diff --git a/infra/conda/dolfin/build.sh b/infra/conda/dolfin/build.sh deleted file mode 100644 index 9459e251..00000000 --- a/infra/conda/dolfin/build.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -mkdir build -cd build - -#CC=$PREFIX/bin/cc -#CXX=$PREFIX/bin/c++ - -export LIBRARY_PATH=$PREFIX/lib -export INCLUDE_PATH=$PREFIX/include - -#export BLAS_DIR=$LIBRARY_PATH - -cmake .. \ - -DDOLFIN_ENABLE_VTK:BOOL=FALSE \ - -DDOLFIN_ENABLE_QT:BOOL=FALSE \ - -DDOLFIN_ENABLE_TRILINOS=FALSE \ - -DDOLFIN_ENABLE_HDF5=FALSE \ - -DDOLFIN_ENABLE_SLEPC=FALSE \ - -DDOLFIN_ENABLE_SPHINX=FALSE \ -\ - -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \ - -DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \ -\ - -DBoost_INCLUDE_DIR=$INCLUDE_PATH \ - -DBoost_LIBRARY_DIRS=$LIBRARY_PATH \ - -DBoost_FILESYSTEM_LIBRARY=$LIBRARY_PATH/libboost_filesystem.so \ -#\ -# -DMPI_C_LIBRARIES=$LIBRARY_PATH/libmpich.so \ -# -DMPI_C_INCLUDE_PATH=$INCLUDE_PATH \ -# -DMPI_CXX_LIBRARIES=$LIBRARY_PATH/libmpichcxx.so \ -# -DMPI_CXX_INCLUDE_PATH=$INCLUDE_PATH \ -# -DMPI_Fortran_LIBRARIES=$LIBRARY_PATH/libmpichf90.so \ -# -DMPI_Fortran_INCLUDE_PATH=$INCLUDE_PATH - -make -j${CPU_COUNT} -make install diff --git a/infra/conda/dolfin/meta.yaml b/infra/conda/dolfin/meta.yaml deleted file mode 100644 index 432c9ef7..00000000 --- a/infra/conda/dolfin/meta.yaml +++ /dev/null @@ -1,58 +0,0 @@ -package: - name: dolfin - version: "1.6.0" - -source: - fn: dolfin-1.6.0.tar.gz - url: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz - md5: 35cb4baf7ab4152a40fb7310b34d5800 - -build: - number: 6 - -requirements: - build: - - python -# - openblas - - cmake - - sphinx - - libxml2 - - swig ==3.0.7 - - numpy - #- vtk - - ffc ==1.6.0 - - ply - - boost -# - eigen3 - - petsc ==3.6.3 - - petsc4py ==3.6.0 -# - slepc <=3.6.2 - - run: - - python -# - openblas - - libxml2 - - swig ==3.0.7 - - numpy - #- vtk - - ffc ==1.6.0 - - ufl ==1.6.0 - - ply - - boost -# - eigen3 - - petsc ==3.6.3 - - petsc4py ==3.6.0 -# - slepc <=3.6.2 - -test: - imports: - - dolfin - -about: - home: http://www.fenicsproject.org - license: The GNU Lesser General Public License, version 3.0 - summary: 'C++/Python library for solving differential equations' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/fenics/meta.yaml b/infra/conda/fenics/meta.yaml deleted file mode 100644 index 5b04d2a3..00000000 --- a/infra/conda/fenics/meta.yaml +++ /dev/null @@ -1,19 +0,0 @@ -package: - name: fenics - version: "1.6.0" - -requirements: - run: - - dolfin ==1.6.0 - - ffc ==1.6.0 - - fiat ==1.6.0 - - ufl ==1.6.0 - - instant ==1.6.0 - -about: - home: http://www.fenicsproject.org - summary: 'FEniCS is a collection of free software for automated, efficient solution of differential equations' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/ffc/build.sh b/infra/conda/ffc/build.sh deleted file mode 100644 index 17a1099d..00000000 --- a/infra/conda/ffc/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -#export CC=$PREFIX/bin/gcc -#export CXX=$PREFIX/bin/g++ - -$PYTHON setup.py install --prefix=$PREFIX - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/ffc/dont_run_test.sh b/infra/conda/ffc/dont_run_test.sh deleted file mode 100644 index ec6ff277..00000000 --- a/infra/conda/ffc/dont_run_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -export CC=$PREFIX/bin/gcc -export CXX=$PREFIX/bin/g++ - -cd $SRC_DIR/test/unit -python test.py diff --git a/infra/conda/ffc/meta.yaml b/infra/conda/ffc/meta.yaml deleted file mode 100644 index 7171c31e..00000000 --- a/infra/conda/ffc/meta.yaml +++ /dev/null @@ -1,53 +0,0 @@ -package: - name: ffc - version: "1.6.0" - -source: - fn: ffc-1.6.0.tar.gz - url: https://bitbucket.org/fenics-project/ffc/downloads/ffc-1.6.0.tar.gz - md5: 358faa3e9da62a1b1a717070217b793e - -build: - number: 4 - -requirements: - build: - - python - - numpy - - swig ==3.0.7 -# - gcc -# - libgfortran - - run: - - python - - numpy - - swig ==3.0.7 - - ufl ==1.6.0 - - fiat ==1.6.0 - - instant ==1.6.0 -# - libgcc -# - libgfortran - -test: - imports: - - ffc - - ffc.backends - - ffc.backends.dolfin - - ffc.backends.ufc - - ffc.errorcontrol - - ffc.quadrature - - ffc.tensor - #- ffc_time_ext.time_elements_ext # See #47 - - ufc - - commands: - - ffc --help - -about: - home: http://fenicsproject.org/ - license: The GNU Lesser General Public License, version 3.0 - summary: 'The FEniCS Form Compiler' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/fiat/build.sh b/infra/conda/fiat/build.sh deleted file mode 100644 index 4d7fc032..00000000 --- a/infra/conda/fiat/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/fiat/meta.yaml b/infra/conda/fiat/meta.yaml deleted file mode 100644 index 0766a4f8..00000000 --- a/infra/conda/fiat/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -package: - name: fiat - version: "1.6.0" - -source: - fn: fiat-1.6.0.tar.gz - url: https://bitbucket.org/fenics-project/fiat/downloads/fiat-1.6.0.tar.gz - md5: f4509d05c911fd93cea8d288a78a6c6f - -build: - number: 1 - -requirements: - build: - - python - - sympy - - run: - - python - - numpy - - sympy - -test: - imports: - - FIAT - - requires: - - nose - -about: - home: http://fenicsproject.org/ - license: The GNU Lesser General Public License, version 3.0 - summary: 'FInite element Automatic Tabulator' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/fiat/run_test.sh b/infra/conda/fiat/run_test.sh deleted file mode 100644 index 18bf498b..00000000 --- a/infra/conda/fiat/run_test.sh +++ /dev/null @@ -1 +0,0 @@ -nosetests $SRC_DIR/test diff --git a/infra/conda/instant/build.sh b/infra/conda/instant/build.sh deleted file mode 100644 index 4d7fc032..00000000 --- a/infra/conda/instant/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/instant/meta.yaml b/infra/conda/instant/meta.yaml deleted file mode 100644 index a67dba1a..00000000 --- a/infra/conda/instant/meta.yaml +++ /dev/null @@ -1,45 +0,0 @@ -package: - name: instant - version: "1.6.0" - -source: - fn: instant-1.6.0.tar.gz - url: https://bitbucket.org/fenics-project/instant/downloads/instant-1.6.0.tar.gz - md5: 5f2522eb032a5bebbad6597b6fe0732a - -build: - number: 3 - -requirements: - build: - - python - - run: - - python - - numpy - #- make - - cmake - #- pkg-config - - swig -# - gcc -# - libgfortran - -test: - imports: - - instant - - commands: - - instant-clean - - instant-showcache - - requires: - - nose - -about: - home: http://www.fenicsproject.org - license: BSD License or The GNU Lesser General Public License, version 3.0 - summary: 'Instant Inlining of C/C++ in Python' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/instant/run_test.sh b/infra/conda/instant/run_test.sh deleted file mode 100644 index 7c8aaf14..00000000 --- a/infra/conda/instant/run_test.sh +++ /dev/null @@ -1,2 +0,0 @@ -cd $SRC_DIR/test -python run_tests.py diff --git a/infra/conda/itk/build.sh b/infra/conda/itk/build.sh deleted file mode 100644 index a28db5cc..00000000 --- a/infra/conda/itk/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -mkdir build -cd build - -cmake .. \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_EXAMPLES:BOOL=off \ - -DITK_WRAP_PYTHON:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DITK_USE_FLAT_DIRECTORY_INSTALL:BOOL=ON \ - -DITK_USE_REVIEW:BOOL=ON \ - -DModule_ITKReview:BOOL=ON \ - -DVTK_DIR:PATH=${PREFIX} \ - -DBUILD_TESTING:BOOL=OFF \ - -DModule_ITKVtkGlue:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" - -make -j${CPU_COUNT} -make install diff --git a/infra/conda/itk/meta.yaml b/infra/conda/itk/meta.yaml deleted file mode 100644 index 4f375446..00000000 --- a/infra/conda/itk/meta.yaml +++ /dev/null @@ -1,23 +0,0 @@ -package: - name: itk - version: 4.10.0 - -source: - url: https://sourceforge.net/projects/itk/files/itk/4.10/InsightToolkit-4.10.0.tar.gz - fn: InsightToolkit-4.10.0.tar.gz - -build: - number: 1 - -requirements: - build: - - cmake - - python - - vtk - run: - - python - - vtk - -about: - home: http://www.itk.org/ - license: BSD diff --git a/infra/conda/openmpi/build.sh b/infra/conda/openmpi/build.sh deleted file mode 100644 index 94a1d588..00000000 --- a/infra/conda/openmpi/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -./configure --prefix=$PREFIX -make -make install diff --git a/infra/conda/openmpi/meta.yaml b/infra/conda/openmpi/meta.yaml deleted file mode 100644 index 628dda5f..00000000 --- a/infra/conda/openmpi/meta.yaml +++ /dev/null @@ -1,35 +0,0 @@ -package: - name: openmpi - version: 1.8.8 - -source: - fn: openmpi-1.8.8.tar.bz2 - url: http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.bz2 - -requirements: - conflicts: - - mpich - - mpich2 - -about: - home: http://www.open-mpi.org/ - license: new BSD (http://www.open-mpi.org/community/license.php) - -build: - number: 2 - -# From mpi4py recipe -test: - files: - - test/helloworld.c - - test/helloworld.cxx - commands: - - command -v ompi_info - - ompi_info - - command -v mpiexec - - mpiexec -n 4 hostname - - command -v mpicc - - mpicc -show - - mpicc helloworld.c -o helloworld_c - - export DYLD_LIBRARY_PATH=$PREFIX/lib # [osx] - - mpiexec -n 4 ./helloworld_c diff --git a/infra/conda/openmpi/post-link.sh b/infra/conda/openmpi/post-link.sh deleted file mode 100644 index 9f358723..00000000 --- a/infra/conda/openmpi/post-link.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -mkdir -p $PREFIX/etc/conda/deactivate.d -mkdir -p $PREFIX/etc/conda/activate.d -cat < $PREFIX/etc/conda/deactivate.d/openmpi.sh -echo unsetting OPAL_PREFIX -export OPAL_PREFIX=$OPAL_PREFIX_OLD -unset OPAL_PREFIX_OLD -EOF -cat < $PREFIX/etc/conda/activate.d/openmpi.sh -#!/bin/sh -echo setting OPAL_PREFIX to $PREFIX -export OPAL_PREFIX_OLD=$OPAL_PREFIX -export OPAL_PREFIX=$PREFIX -EOF - diff --git a/infra/conda/openmpi/pre-unlink.sh b/infra/conda/openmpi/pre-unlink.sh deleted file mode 100644 index a434634f..00000000 --- a/infra/conda/openmpi/pre-unlink.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -rm -f $PREFIX/etc/conda/deactivate.d/openmpi.sh -rm -f $PREFIX/etc/conda/activate.d/openmpi.sh diff --git a/infra/conda/openmpi/test/helloworld.c b/infra/conda/openmpi/test/helloworld.c deleted file mode 100644 index cd4cae4a..00000000 --- a/infra/conda/openmpi/test/helloworld.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -int main(int argc, char *argv[]) -{ - int provided, size, rank, len; - char name[MPI_MAX_PROCESSOR_NAME]; - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); - - MPI_Comm_size(MPI_COMM_WORLD, &size); - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Get_processor_name(name, &len); - - printf("Hello, World! I am process %d of %d on %s.\n", rank, size, name); - - MPI_Finalize(); - return 0; -} diff --git a/infra/conda/openmpi/test/helloworld.cxx b/infra/conda/openmpi/test/helloworld.cxx deleted file mode 100644 index 8d46772b..00000000 --- a/infra/conda/openmpi/test/helloworld.cxx +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -int main(int argc, char *argv[]) -{ - MPI::Init_thread(MPI_THREAD_MULTIPLE); - - int size = MPI::COMM_WORLD.Get_size(); - int rank = MPI::COMM_WORLD.Get_rank(); - int len; char name[MPI_MAX_PROCESSOR_NAME]; - MPI::Get_processor_name(name, len); - - std::cout << - "Hello, World! " << - "I am process " << rank << - " of " << size << - " on " << name << - "." << std::endl; - - MPI::Finalize(); - return 0; -} diff --git a/infra/conda/openmpi/test/helloworld.f08 b/infra/conda/openmpi/test/helloworld.f08 deleted file mode 100644 index 2a625422..00000000 --- a/infra/conda/openmpi/test/helloworld.f08 +++ /dev/null @@ -1,23 +0,0 @@ -program main - - use mpi_f08 - implicit none - - integer :: provided, size, rank, len - character (len=MPI_MAX_PROCESSOR_NAME) :: name - - call MPI_Init_thread(MPI_THREAD_MULTIPLE, provided) - - call MPI_Comm_rank(MPI_COMM_WORLD, rank) - call MPI_Comm_size(MPI_COMM_WORLD, size) - call MPI_Get_processor_name(name, len) - - write(*, '(2A,I2,A,I2,3A)') & - 'Hello, World! ', & - 'I am process ', rank, & - ' of ', size, & - ' on ', name(1:len), '.' - - call MPI_Finalize() - -end program main diff --git a/infra/conda/openmpi/test/helloworld.f90 b/infra/conda/openmpi/test/helloworld.f90 deleted file mode 100644 index 6c454bfe..00000000 --- a/infra/conda/openmpi/test/helloworld.f90 +++ /dev/null @@ -1,23 +0,0 @@ -program main - - use mpi - implicit none - - integer :: provided, ierr, size, rank, len - character (len=MPI_MAX_PROCESSOR_NAME) :: name - - call MPI_Init_thread(MPI_THREAD_MULTIPLE, provided, ierr) - - call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr) - call MPI_Comm_size(MPI_COMM_WORLD, size, ierr) - call MPI_Get_processor_name(name, len, ierr) - - write(*, '(2A,I2,A,I2,3A)') & - 'Hello, World! ', & - 'I am process ', rank, & - ' of ', size, & - ' on ', name(1:len), '.' - - call MPI_Finalize(ierr) - -end program main diff --git a/infra/conda/petsc/build.sh b/infra/conda/petsc/build.sh deleted file mode 100644 index def65eb6..00000000 --- a/infra/conda/petsc/build.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -export PETSC_DIR=$SRC_DIR -export PETSC_ARCH=arch-conda-c-opt - -if [[ $(uname) == Darwin ]]; then - SO=dylib -else - SO=so -fi - -export MPICH=https://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz -export HDF5=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.16/src/hdf5-1.8.16.tar.bz2 - -$PYTHON ./configure \ - --with-debugging=0 \ - --download-mpich \ - --download-hdf5=$HDF5 \ - --COPTFLAGS=-O3 \ - --CXXOPTFLAGS=-O3 \ - --LIBS=-Wl,-rpath,$PREFIX/lib \ - --with-hwloc=0 \ - --with-ssl=0 \ - --with-x=0 \ - --download-hypre \ - --download-f2cblaslapack \ - --download-hdf5 \ - --download-parmetis \ - --download-metis \ - --download-sundials \ - --with-shared-libraries \ - --with-clanguage=cxx \ - --prefix=$PREFIX - -sedinplace() { [[ $(uname) == Darwin ]] && sed -i "" $@ || sed -i"" $@; } -for path in $PETSC_DIR $PREFIX; do - sedinplace s%$path%\${PETSC_DIR}%g $PETSC_ARCH/include/petsc*.h -done - -make -make install - - diff --git a/infra/conda/petsc/meta.yaml b/infra/conda/petsc/meta.yaml deleted file mode 100644 index 00035987..00000000 --- a/infra/conda/petsc/meta.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{% set build = 0 %} -{% set version = '3.7.5' %} -{% set md5 = 'bfc7a5535d5c18c6ec81ab90f3ce5074' %} - -package: - name: petsc - version: {{version}} - -source: - fn: petsc-lite-{{version}}.tar.gz - url: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-{{version}}.tar.gz - md5: {{md5}} - -build: - number: 0 - binary_relocation: true - detect_binary_files_with_prefix: true - skip: true # [win or py3k] - -requirements: - build: - - python - - cmake - - readline - -about: - home: http://www.mcs.anl.gov/petsc/ - summary: 'PETSc: Portable, Extensible Toolkit for Scientific Computation' - license: BSD 2-Clause - license_file: LICENSE diff --git a/infra/conda/petsc/petsc.patch b/infra/conda/petsc/petsc.patch deleted file mode 100644 index 04211c8a..00000000 --- a/infra/conda/petsc/petsc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur petsc-3.6.3/config/BuildSystem/script.py petsc-3.6.3_mod/config/BuildSystem/script.py ---- petsc-3.6.3/config/BuildSystem/script.py 2015-07-22 16:22:46.000000000 +0100 -+++ petsc-3.6.3_mod/config/BuildSystem/script.py 2016-08-04 19:06:44.781881601 +0100 -@@ -192,7 +192,7 @@ - else: - outputClosed = 1 - lst.remove(output) -- if out.find('password:') >= 0 or err.find('password:') >= 0: -+ if msg and msg.find('password:') >= 0: - loginError = 1 - break - if outputClosed and errorClosed: diff --git a/infra/conda/petsc4py/build.sh b/infra/conda/petsc4py/build.sh deleted file mode 100644 index 7e044a4b..00000000 --- a/infra/conda/petsc4py/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -export PETSC_DIR=$PREFIX -$PYTHON setup.py install diff --git a/infra/conda/petsc4py/meta.yaml b/infra/conda/petsc4py/meta.yaml deleted file mode 100644 index 4cca14d5..00000000 --- a/infra/conda/petsc4py/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -package: - name: petsc4py - version: "3.7.0" - -source: - fn: petsc4py-3.7.0.tar.gz - url: https://bitbucket.org/petsc/petsc4py/downloads/petsc4py-3.7.0.tar.gz - md5: 816a20040a6a477bd637f397c9fb5b6d - -build: - number: 4 - -requirements: - build: - - python - - pip - - numpy - - petsc ==3.7.5 - - run: - - python - - numpy - - petsc ==3.7.5 - -test: - imports: - - petsc4py - - petsc4py.lib - -about: - home: https://bitbucket.org/petsc/petsc4py/ - license: BSD License - summary: 'PETSc for Python' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/rdflib/bld.bat b/infra/conda/rdflib/bld.bat deleted file mode 100644 index 9146a4bf..00000000 --- a/infra/conda/rdflib/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/infra/conda/rdflib/build.sh b/infra/conda/rdflib/build.sh deleted file mode 100644 index 3f50b74e..00000000 --- a/infra/conda/rdflib/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/rdflib/meta.yaml b/infra/conda/rdflib/meta.yaml deleted file mode 100644 index c47852f9..00000000 --- a/infra/conda/rdflib/meta.yaml +++ /dev/null @@ -1,62 +0,0 @@ -package: - name: rdflib - version: "4.2.1" - -source: - fn: rdflib-4.2.1.tar.gz - url: https://pypi.python.org/packages/9d/fa/4198e8d8b444a4ace5c8fd86d128c2faa210a6e281973c8e5e16d978eaf4/rdflib-4.2.1.tar.gz - md5: 528adaa10536d14a608507d7831711f5 -# patches: - # List any patch files here - # - fix.patch - -build: - # noarch_python: True - # preserve_egg_dir: True - entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - rdflib = rdflib:main - # - # Would create an entry point called rdflib that calls rdflib.main() - - - rdfpipe = rdflib.tools.rdfpipe:main - - csv2rdf = rdflib.tools.csv2rdf:main - - rdf2dot = rdflib.tools.rdf2dot:main - - rdfs2dot = rdflib.tools.rdfs2dot:main - - rdfgraphisomorphism = rdflib.tools.graphisomorphism:main - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - run: - - python - - isodate - -test: - # Python imports - imports: - - rdflib - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/RDFLib/rdflib - license: BSD License - summary: 'RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.' - license_family: BSD - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/readline/build.sh b/infra/conda/readline/build.sh deleted file mode 100755 index 093e7055..00000000 --- a/infra/conda/readline/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e - -./configure --prefix=$PREFIX -make -j$(getconf _NPROCESSORS_ONLN) SHLIB_LIBS="-ltinfo -L$LD_RUN_PATH" -make install diff --git a/infra/conda/readline/meta.yaml b/infra/conda/readline/meta.yaml deleted file mode 100644 index 33296d24..00000000 --- a/infra/conda/readline/meta.yaml +++ /dev/null @@ -1,21 +0,0 @@ -package: - name: readline - version: "6.2" - -source: - fn: readline-6.2.tar.gz - url: ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz - -build: - number: 6 - -about: - home: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html - license: GPL 3.0 - -#requirements: -# build: -# - ncurses >=5.9 -# run: -# - ncurses >=5.9 - diff --git a/infra/conda/swig/build.sh b/infra/conda/swig/build.sh deleted file mode 100644 index 63723bfd..00000000 --- a/infra/conda/swig/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -export CPPFLAGS=-I$PREFIX/include - -./configure --prefix=$PREFIX -make -j${CPU_COUNT} -#make check -make install diff --git a/infra/conda/swig/meta.yaml b/infra/conda/swig/meta.yaml deleted file mode 100644 index 94ec3559..00000000 --- a/infra/conda/swig/meta.yaml +++ /dev/null @@ -1,31 +0,0 @@ -package: - name: swig - version: 3.0.7 - -source: - fn: swig-3.0.7.tar.gz - url: http://prdownloads.sourceforge.net/swig/swig-3.0.7.tar.gz - md5: 7fff46c84b8c630ede5b0f0827e3d90a - -build: - detect_binary_files_with_prefix: True - -requirements: - build: -# - gcc - - zlib - - pcre - - python - - run: -# - libgcc - - zlib - - pcre - -test: - commands: - - swig -help - -about: - home: http://www.swig.org/ - license: GPLv3 diff --git a/infra/conda/ufl/build.sh b/infra/conda/ufl/build.sh deleted file mode 100644 index 4d7fc032..00000000 --- a/infra/conda/ufl/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/infra/conda/ufl/meta.yaml b/infra/conda/ufl/meta.yaml deleted file mode 100644 index 11e891b8..00000000 --- a/infra/conda/ufl/meta.yaml +++ /dev/null @@ -1,47 +0,0 @@ -package: - name: ufl - version: "1.6.0" - -source: - fn: ufl-1.6.0.tar.gz - url: https://bitbucket.org/fenics-project/ufl/downloads/ufl-1.6.0.tar.gz - md5: c40c5f04eaa847377ab2323122284016 - -build: - number: 1 - -requirements: - build: - - python - - run: - - python - - six - -test: - imports: - - ufl - - ufl.utils - - ufl.finiteelement - - ufl.core - - ufl.corealg - - ufl.algorithms - - commands: -# - ufl-convert --help # See #55 - - ufl-version - - ufl2py --help -# - form2ufl --help # See #56 - - requires: - - pytest - - -about: - home: http://www.fenicsproject.org - license: The GNU Lesser General Public License, version 3.0 - summary: 'Unified Form Language' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/infra/conda/ufl/run_test.sh b/infra/conda/ufl/run_test.sh deleted file mode 100644 index 65fe760b..00000000 --- a/infra/conda/ufl/run_test.sh +++ /dev/null @@ -1,2 +0,0 @@ -cd $SRC_DIR/test -py.test diff --git a/infra/conda/vmtk/build.sh b/infra/conda/vmtk/build.sh deleted file mode 100644 index 9406ff8c..00000000 --- a/infra/conda/vmtk/build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -mkdir build -cd build - -cmake .. \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DUSE_SYSTEM_ITK:BOOL=ON \ - -DUSE_SYSTEM_VTK:BOOL=ON \ - -DITK_DIR:PATH=${PREFIX} \ - -DVTK_DIR:PATH=${PREFIX} - -make -j${CPU_COUNT} -cd ../.. -cp -R vmtk-1.3/build/Install/* ${PREFIX} diff --git a/infra/conda/vmtk/meta.yaml b/infra/conda/vmtk/meta.yaml deleted file mode 100644 index b657503f..00000000 --- a/infra/conda/vmtk/meta.yaml +++ /dev/null @@ -1,24 +0,0 @@ -package: - name: vmtk - version: 1.3 - -source: - url: https://github.com/vmtk/vmtk/archive/v1.3.tar.gz - fn: v1.3.tar.gz - -build: - number: 6 - -requirements: - build: - - itk ==4.10.0 - - python - - vtk ==6.3.0 - run: - - itk ==4.10.0 - - python - - vtk ==6.3.0 - -about: - home: http://www.vmtk.org/ - license: BSD. http://www.vmtk.org/license.html diff --git a/infra/conda/xerces-c/build.sh b/infra/conda/xerces-c/build.sh deleted file mode 100755 index 06ed050c..00000000 --- a/infra/conda/xerces-c/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -./configure --prefix=$PREFIX --without-icu -make -j $CPU_COUNT -make install -j $CPU_COUNT diff --git a/infra/conda/xerces-c/meta.yaml b/infra/conda/xerces-c/meta.yaml deleted file mode 100644 index f6bc9daa..00000000 --- a/infra/conda/xerces-c/meta.yaml +++ /dev/null @@ -1,15 +0,0 @@ -package: - name: xerces-c - version: "3.1.3" - -source: - fn: xerces-c-3.1.3.tar.gz - url: http://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.gz - -build: - number: 2 - -about: - home: http://xerces.apache.org/xerces-c/ - license: Apache 2.0 - From 5ae4a7825fb5ff6f4be2628d89856d8617df7e86 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:44:18 +0000 Subject: [PATCH 13/53] #42 separate chaste py build scripts --- .../linux_64_python3.10.____cpython.yaml | 0 infra/conda/chaste/{ => py310}/.gitignore | 0 .../{ => py310}/.scripts/build_steps.sh | 0 .../{ => py310}/.scripts/run_docker_build.sh | 0 infra/conda/chaste/{ => py310}/LICENSE.txt | 0 .../chaste/{build-py310.sh => py310/build.sh} | 0 .../conda/chaste/{ => py310}/recipe/build.sh | 0 .../conda/chaste/{ => py310}/recipe/meta.yaml | 0 .../{ => py310}/recipe/patches/petsc.patch | 0 .../{ => py310}/recipe/patches/vtk.patch | 0 .../recipe/recipe-scripts-license.txt | 0 .../linux_64_python3.11.____cpython.yaml | 0 infra/conda/chaste/py311/.gitignore | 3 + .../chaste/py311/.scripts/build_steps.sh | 72 +++++++++++++++++ .../chaste/py311/.scripts/run_docker_build.sh | 35 ++++++++ infra/conda/chaste/py311/LICENSE.txt | 27 +++++++ .../chaste/{build-py311.sh => py311/build.sh} | 0 infra/conda/chaste/py311/recipe/build.sh | 72 +++++++++++++++++ infra/conda/chaste/py311/recipe/meta.yaml | 80 +++++++++++++++++++ .../chaste/py311/recipe/patches/petsc.patch | 13 +++ .../chaste/py311/recipe/patches/vtk.patch | 13 +++ .../py311/recipe/recipe-scripts-license.txt | 27 +++++++ .../linux_64_python3.12.____cpython.yaml | 0 infra/conda/chaste/py312/.gitignore | 3 + .../chaste/py312/.scripts/build_steps.sh | 72 +++++++++++++++++ .../chaste/py312/.scripts/run_docker_build.sh | 35 ++++++++ infra/conda/chaste/py312/LICENSE.txt | 27 +++++++ infra/conda/chaste/py312/build.sh | 12 +++ infra/conda/chaste/py312/recipe/build.sh | 72 +++++++++++++++++ infra/conda/chaste/py312/recipe/meta.yaml | 80 +++++++++++++++++++ .../chaste/py312/recipe/patches/petsc.patch | 13 +++ .../chaste/py312/recipe/patches/vtk.patch | 13 +++ .../py312/recipe/recipe-scripts-license.txt | 27 +++++++ .../linux_64_python3.8.____cpython.yaml | 0 infra/conda/chaste/py38/.gitignore | 3 + .../conda/chaste/py38/.scripts/build_steps.sh | 72 +++++++++++++++++ .../chaste/py38/.scripts/run_docker_build.sh | 35 ++++++++ infra/conda/chaste/py38/LICENSE.txt | 27 +++++++ infra/conda/chaste/py38/build.sh | 12 +++ infra/conda/chaste/py38/recipe/build.sh | 72 +++++++++++++++++ infra/conda/chaste/py38/recipe/meta.yaml | 80 +++++++++++++++++++ .../chaste/py38/recipe/patches/petsc.patch | 13 +++ .../chaste/py38/recipe/patches/vtk.patch | 13 +++ .../py38/recipe/recipe-scripts-license.txt | 27 +++++++ .../linux_64_python3.9.____cpython.yaml | 0 infra/conda/chaste/py39/.gitignore | 3 + .../conda/chaste/py39/.scripts/build_steps.sh | 72 +++++++++++++++++ .../chaste/py39/.scripts/run_docker_build.sh | 35 ++++++++ infra/conda/chaste/py39/LICENSE.txt | 27 +++++++ infra/conda/chaste/py39/build.sh | 12 +++ infra/conda/chaste/py39/recipe/build.sh | 72 +++++++++++++++++ infra/conda/chaste/py39/recipe/meta.yaml | 80 +++++++++++++++++++ .../chaste/py39/recipe/patches/petsc.patch | 13 +++ .../chaste/py39/recipe/patches/vtk.patch | 13 +++ .../py39/recipe/recipe-scripts-license.txt | 27 +++++++ 55 files changed, 1404 insertions(+) rename infra/conda/chaste/{ => py310}/.ci_support/linux_64_python3.10.____cpython.yaml (100%) rename infra/conda/chaste/{ => py310}/.gitignore (100%) rename infra/conda/chaste/{ => py310}/.scripts/build_steps.sh (100%) rename infra/conda/chaste/{ => py310}/.scripts/run_docker_build.sh (100%) rename infra/conda/chaste/{ => py310}/LICENSE.txt (100%) rename infra/conda/chaste/{build-py310.sh => py310/build.sh} (100%) rename infra/conda/chaste/{ => py310}/recipe/build.sh (100%) rename infra/conda/chaste/{ => py310}/recipe/meta.yaml (100%) rename infra/conda/chaste/{ => py310}/recipe/patches/petsc.patch (100%) rename infra/conda/chaste/{ => py310}/recipe/patches/vtk.patch (100%) rename infra/conda/chaste/{ => py310}/recipe/recipe-scripts-license.txt (100%) rename infra/conda/chaste/{ => py311}/.ci_support/linux_64_python3.11.____cpython.yaml (100%) create mode 100755 infra/conda/chaste/py311/.gitignore create mode 100755 infra/conda/chaste/py311/.scripts/build_steps.sh create mode 100755 infra/conda/chaste/py311/.scripts/run_docker_build.sh create mode 100644 infra/conda/chaste/py311/LICENSE.txt rename infra/conda/chaste/{build-py311.sh => py311/build.sh} (100%) create mode 100755 infra/conda/chaste/py311/recipe/build.sh create mode 100644 infra/conda/chaste/py311/recipe/meta.yaml create mode 100644 infra/conda/chaste/py311/recipe/patches/petsc.patch create mode 100644 infra/conda/chaste/py311/recipe/patches/vtk.patch create mode 100644 infra/conda/chaste/py311/recipe/recipe-scripts-license.txt rename infra/conda/chaste/{ => py312}/.ci_support/linux_64_python3.12.____cpython.yaml (100%) create mode 100755 infra/conda/chaste/py312/.gitignore create mode 100755 infra/conda/chaste/py312/.scripts/build_steps.sh create mode 100755 infra/conda/chaste/py312/.scripts/run_docker_build.sh create mode 100644 infra/conda/chaste/py312/LICENSE.txt create mode 100755 infra/conda/chaste/py312/build.sh create mode 100755 infra/conda/chaste/py312/recipe/build.sh create mode 100644 infra/conda/chaste/py312/recipe/meta.yaml create mode 100644 infra/conda/chaste/py312/recipe/patches/petsc.patch create mode 100644 infra/conda/chaste/py312/recipe/patches/vtk.patch create mode 100644 infra/conda/chaste/py312/recipe/recipe-scripts-license.txt rename infra/conda/chaste/{ => py38}/.ci_support/linux_64_python3.8.____cpython.yaml (100%) create mode 100755 infra/conda/chaste/py38/.gitignore create mode 100755 infra/conda/chaste/py38/.scripts/build_steps.sh create mode 100755 infra/conda/chaste/py38/.scripts/run_docker_build.sh create mode 100644 infra/conda/chaste/py38/LICENSE.txt create mode 100755 infra/conda/chaste/py38/build.sh create mode 100755 infra/conda/chaste/py38/recipe/build.sh create mode 100644 infra/conda/chaste/py38/recipe/meta.yaml create mode 100644 infra/conda/chaste/py38/recipe/patches/petsc.patch create mode 100644 infra/conda/chaste/py38/recipe/patches/vtk.patch create mode 100644 infra/conda/chaste/py38/recipe/recipe-scripts-license.txt rename infra/conda/chaste/{ => py39}/.ci_support/linux_64_python3.9.____cpython.yaml (100%) create mode 100755 infra/conda/chaste/py39/.gitignore create mode 100755 infra/conda/chaste/py39/.scripts/build_steps.sh create mode 100755 infra/conda/chaste/py39/.scripts/run_docker_build.sh create mode 100644 infra/conda/chaste/py39/LICENSE.txt create mode 100755 infra/conda/chaste/py39/build.sh create mode 100755 infra/conda/chaste/py39/recipe/build.sh create mode 100644 infra/conda/chaste/py39/recipe/meta.yaml create mode 100644 infra/conda/chaste/py39/recipe/patches/petsc.patch create mode 100644 infra/conda/chaste/py39/recipe/patches/vtk.patch create mode 100644 infra/conda/chaste/py39/recipe/recipe-scripts-license.txt diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/chaste/py310/.ci_support/linux_64_python3.10.____cpython.yaml similarity index 100% rename from infra/conda/chaste/.ci_support/linux_64_python3.10.____cpython.yaml rename to infra/conda/chaste/py310/.ci_support/linux_64_python3.10.____cpython.yaml diff --git a/infra/conda/chaste/.gitignore b/infra/conda/chaste/py310/.gitignore similarity index 100% rename from infra/conda/chaste/.gitignore rename to infra/conda/chaste/py310/.gitignore diff --git a/infra/conda/chaste/.scripts/build_steps.sh b/infra/conda/chaste/py310/.scripts/build_steps.sh similarity index 100% rename from infra/conda/chaste/.scripts/build_steps.sh rename to infra/conda/chaste/py310/.scripts/build_steps.sh diff --git a/infra/conda/chaste/.scripts/run_docker_build.sh b/infra/conda/chaste/py310/.scripts/run_docker_build.sh similarity index 100% rename from infra/conda/chaste/.scripts/run_docker_build.sh rename to infra/conda/chaste/py310/.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/LICENSE.txt b/infra/conda/chaste/py310/LICENSE.txt similarity index 100% rename from infra/conda/chaste/LICENSE.txt rename to infra/conda/chaste/py310/LICENSE.txt diff --git a/infra/conda/chaste/build-py310.sh b/infra/conda/chaste/py310/build.sh similarity index 100% rename from infra/conda/chaste/build-py310.sh rename to infra/conda/chaste/py310/build.sh diff --git a/infra/conda/chaste/recipe/build.sh b/infra/conda/chaste/py310/recipe/build.sh similarity index 100% rename from infra/conda/chaste/recipe/build.sh rename to infra/conda/chaste/py310/recipe/build.sh diff --git a/infra/conda/chaste/recipe/meta.yaml b/infra/conda/chaste/py310/recipe/meta.yaml similarity index 100% rename from infra/conda/chaste/recipe/meta.yaml rename to infra/conda/chaste/py310/recipe/meta.yaml diff --git a/infra/conda/chaste/recipe/patches/petsc.patch b/infra/conda/chaste/py310/recipe/patches/petsc.patch similarity index 100% rename from infra/conda/chaste/recipe/patches/petsc.patch rename to infra/conda/chaste/py310/recipe/patches/petsc.patch diff --git a/infra/conda/chaste/recipe/patches/vtk.patch b/infra/conda/chaste/py310/recipe/patches/vtk.patch similarity index 100% rename from infra/conda/chaste/recipe/patches/vtk.patch rename to infra/conda/chaste/py310/recipe/patches/vtk.patch diff --git a/infra/conda/chaste/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py310/recipe/recipe-scripts-license.txt similarity index 100% rename from infra/conda/chaste/recipe/recipe-scripts-license.txt rename to infra/conda/chaste/py310/recipe/recipe-scripts-license.txt diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/chaste/py311/.ci_support/linux_64_python3.11.____cpython.yaml similarity index 100% rename from infra/conda/chaste/.ci_support/linux_64_python3.11.____cpython.yaml rename to infra/conda/chaste/py311/.ci_support/linux_64_python3.11.____cpython.yaml diff --git a/infra/conda/chaste/py311/.gitignore b/infra/conda/chaste/py311/.gitignore new file mode 100755 index 00000000..c89ecb7d --- /dev/null +++ b/infra/conda/chaste/py311/.gitignore @@ -0,0 +1,3 @@ +*.pyc + +build_artifacts diff --git a/infra/conda/chaste/py311/.scripts/build_steps.sh b/infra/conda/chaste/py311/.scripts/build_steps.sh new file mode 100755 index 00000000..3da46528 --- /dev/null +++ b/infra/conda/chaste/py311/.scripts/build_steps.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 + +export FEEDSTOCK_ROOT='/home/conda/feedstock_root' +export RECIPE_ROOT='/home/conda/recipe_root' + +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" + +ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" +mkdir -p "${ARTIFACTS}" + +DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" +rm -f "${DONE_CANARY}" + +docker info + +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" +docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ + -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + "${DOCKER_IMAGE}" \ + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" + +test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py311/LICENSE.txt b/infra/conda/chaste/py311/LICENSE.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py311/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/build-py311.sh b/infra/conda/chaste/py311/build.sh similarity index 100% rename from infra/conda/chaste/build-py311.sh rename to infra/conda/chaste/py311/build.sh diff --git a/infra/conda/chaste/py311/recipe/build.sh b/infra/conda/chaste/py311/recipe/build.sh new file mode 100755 index 00000000..41cfc230 --- /dev/null +++ b/infra/conda/chaste/py311/recipe/build.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -ex + +BUILD_CONFIG=Release + +# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) +# because PETSc already accepted MPICH version during conda solve +cd ${PREFIX}/include +patch -t -p1 < /tmp/patches/petsc.patch + +cd ${PREFIX}/lib/cmake/vtk-7.1 +patch -t -p1 < /tmp/patches/vtk.patch + +# Modify pip environment for chaste_codegen +export PIP_NO_DEPENDENCIES="False" +export PIP_NO_INDEX="False" + +cd ${PREFIX} +mkdir build +cd build || exit + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ + -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ + -DCMAKE_PREFIX_PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DBUILD_SHARED_LIBS=ON \ + -DBOOST_ROOT="${PREFIX}" \ + -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DVTK_DIR=${PREFIX} \ + -DXERCESC_INCLUDE="${PREFIX}/include" \ + -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ + -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ + $SRC_DIR + +# Revert pip environment settings +export PIP_NO_DEPENDENCIES="True" +export PIP_NO_INDEX="True" + +make chaste_project_PyChaste -j${CPU_COUNT} +make project_PyChaste_Python -j${CPU_COUNT} +#make install -j${CPU_COUNT} + +cd projects/PyChaste/python +pip install . --prefix=${PREFIX} + +# Cleanup +cd ${PREFIX}/build +rm -rf cell_based/CMakeFiles +rm -rf global/CMakeFiles +rm -rf io/CMakeFiles +rm -rf linalg/CMakeFiles +rm -rf mesh/CMakeFiles +rm -rf ode/CMakeFiles +rm -rf pde/CMakeFiles +rm -rf python +rm -rf projects/PyChaste/CMakeFiles +rm -rf projects/PyChaste/python + +# The egg-info file is necessary because some packages +# need pkg_resources to be able to find chaste. +# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects + +cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < + Chaste is a general purpose simulation package for computational biology. + dev_url: https://github.com/Chaste/Chaste + doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py311/recipe/patches/petsc.patch b/infra/conda/chaste/py311/recipe/patches/petsc.patch new file mode 100644 index 00000000..c00aca46 --- /dev/null +++ b/infra/conda/chaste/py311/recipe/patches/petsc.patch @@ -0,0 +1,13 @@ +--- a/petscsys.h ++++ b/petscsys.h +@@ -233,8 +233,8 @@ + #elif defined(PETSC_HAVE_MPICH_NUMVERSION) + # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) + # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" +-# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) +-# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" ++//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) ++//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" + # endif + #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) + # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py311/recipe/patches/vtk.patch b/infra/conda/chaste/py311/recipe/patches/vtk.patch new file mode 100644 index 00000000..a61d7b14 --- /dev/null +++ b/infra/conda/chaste/py311/recipe/patches/vtk.patch @@ -0,0 +1,13 @@ +--- a/VTKConfig.cmake ++++ b/VTKConfig.cmake +@@ -25,8 +25,8 @@ + if (CMAKE_VERSION VERSION_LESS "3.1") + message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") + endif() +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED 11) ++ set(CMAKE_CXX_STANDARD 17) ++ set(CMAKE_CXX_STANDARD_REQUIRED 17) + endif() + + # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml b/infra/conda/chaste/py312/.ci_support/linux_64_python3.12.____cpython.yaml similarity index 100% rename from infra/conda/chaste/.ci_support/linux_64_python3.12.____cpython.yaml rename to infra/conda/chaste/py312/.ci_support/linux_64_python3.12.____cpython.yaml diff --git a/infra/conda/chaste/py312/.gitignore b/infra/conda/chaste/py312/.gitignore new file mode 100755 index 00000000..c89ecb7d --- /dev/null +++ b/infra/conda/chaste/py312/.gitignore @@ -0,0 +1,3 @@ +*.pyc + +build_artifacts diff --git a/infra/conda/chaste/py312/.scripts/build_steps.sh b/infra/conda/chaste/py312/.scripts/build_steps.sh new file mode 100755 index 00000000..3da46528 --- /dev/null +++ b/infra/conda/chaste/py312/.scripts/build_steps.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 + +export FEEDSTOCK_ROOT='/home/conda/feedstock_root' +export RECIPE_ROOT='/home/conda/recipe_root' + +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" + +ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" +mkdir -p "${ARTIFACTS}" + +DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" +rm -f "${DONE_CANARY}" + +docker info + +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" +docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ + -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + "${DOCKER_IMAGE}" \ + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" + +test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py312/LICENSE.txt b/infra/conda/chaste/py312/LICENSE.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py312/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/py312/build.sh b/infra/conda/chaste/py312/build.sh new file mode 100755 index 00000000..4c29287b --- /dev/null +++ b/infra/conda/chaste/py312/build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -xeo pipefail + +export CONFIG='linux_64_python3.12.____cpython' +export CHASTE_GIT_BRANCH='develop' +export PYCHASTE_GIT_BRANCH='develop' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=2 + +.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py312/recipe/build.sh b/infra/conda/chaste/py312/recipe/build.sh new file mode 100755 index 00000000..41cfc230 --- /dev/null +++ b/infra/conda/chaste/py312/recipe/build.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -ex + +BUILD_CONFIG=Release + +# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) +# because PETSc already accepted MPICH version during conda solve +cd ${PREFIX}/include +patch -t -p1 < /tmp/patches/petsc.patch + +cd ${PREFIX}/lib/cmake/vtk-7.1 +patch -t -p1 < /tmp/patches/vtk.patch + +# Modify pip environment for chaste_codegen +export PIP_NO_DEPENDENCIES="False" +export PIP_NO_INDEX="False" + +cd ${PREFIX} +mkdir build +cd build || exit + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ + -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ + -DCMAKE_PREFIX_PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DBUILD_SHARED_LIBS=ON \ + -DBOOST_ROOT="${PREFIX}" \ + -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DVTK_DIR=${PREFIX} \ + -DXERCESC_INCLUDE="${PREFIX}/include" \ + -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ + -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ + $SRC_DIR + +# Revert pip environment settings +export PIP_NO_DEPENDENCIES="True" +export PIP_NO_INDEX="True" + +make chaste_project_PyChaste -j${CPU_COUNT} +make project_PyChaste_Python -j${CPU_COUNT} +#make install -j${CPU_COUNT} + +cd projects/PyChaste/python +pip install . --prefix=${PREFIX} + +# Cleanup +cd ${PREFIX}/build +rm -rf cell_based/CMakeFiles +rm -rf global/CMakeFiles +rm -rf io/CMakeFiles +rm -rf linalg/CMakeFiles +rm -rf mesh/CMakeFiles +rm -rf ode/CMakeFiles +rm -rf pde/CMakeFiles +rm -rf python +rm -rf projects/PyChaste/CMakeFiles +rm -rf projects/PyChaste/python + +# The egg-info file is necessary because some packages +# need pkg_resources to be able to find chaste. +# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects + +cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < + Chaste is a general purpose simulation package for computational biology. + dev_url: https://github.com/Chaste/Chaste + doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py312/recipe/patches/petsc.patch b/infra/conda/chaste/py312/recipe/patches/petsc.patch new file mode 100644 index 00000000..c00aca46 --- /dev/null +++ b/infra/conda/chaste/py312/recipe/patches/petsc.patch @@ -0,0 +1,13 @@ +--- a/petscsys.h ++++ b/petscsys.h +@@ -233,8 +233,8 @@ + #elif defined(PETSC_HAVE_MPICH_NUMVERSION) + # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) + # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" +-# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) +-# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" ++//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) ++//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" + # endif + #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) + # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py312/recipe/patches/vtk.patch b/infra/conda/chaste/py312/recipe/patches/vtk.patch new file mode 100644 index 00000000..a61d7b14 --- /dev/null +++ b/infra/conda/chaste/py312/recipe/patches/vtk.patch @@ -0,0 +1,13 @@ +--- a/VTKConfig.cmake ++++ b/VTKConfig.cmake +@@ -25,8 +25,8 @@ + if (CMAKE_VERSION VERSION_LESS "3.1") + message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") + endif() +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED 11) ++ set(CMAKE_CXX_STANDARD 17) ++ set(CMAKE_CXX_STANDARD_REQUIRED 17) + endif() + + # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml b/infra/conda/chaste/py38/.ci_support/linux_64_python3.8.____cpython.yaml similarity index 100% rename from infra/conda/chaste/.ci_support/linux_64_python3.8.____cpython.yaml rename to infra/conda/chaste/py38/.ci_support/linux_64_python3.8.____cpython.yaml diff --git a/infra/conda/chaste/py38/.gitignore b/infra/conda/chaste/py38/.gitignore new file mode 100755 index 00000000..c89ecb7d --- /dev/null +++ b/infra/conda/chaste/py38/.gitignore @@ -0,0 +1,3 @@ +*.pyc + +build_artifacts diff --git a/infra/conda/chaste/py38/.scripts/build_steps.sh b/infra/conda/chaste/py38/.scripts/build_steps.sh new file mode 100755 index 00000000..3da46528 --- /dev/null +++ b/infra/conda/chaste/py38/.scripts/build_steps.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 + +export FEEDSTOCK_ROOT='/home/conda/feedstock_root' +export RECIPE_ROOT='/home/conda/recipe_root' + +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" + +ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" +mkdir -p "${ARTIFACTS}" + +DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" +rm -f "${DONE_CANARY}" + +docker info + +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" +docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ + -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + "${DOCKER_IMAGE}" \ + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" + +test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py38/LICENSE.txt b/infra/conda/chaste/py38/LICENSE.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py38/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/py38/build.sh b/infra/conda/chaste/py38/build.sh new file mode 100755 index 00000000..b5ce1e77 --- /dev/null +++ b/infra/conda/chaste/py38/build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -xeo pipefail + +export CONFIG='linux_64_python3.8.____cpython' +export CHASTE_GIT_BRANCH='develop' +export PYCHASTE_GIT_BRANCH='develop' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=2 + +.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py38/recipe/build.sh b/infra/conda/chaste/py38/recipe/build.sh new file mode 100755 index 00000000..41cfc230 --- /dev/null +++ b/infra/conda/chaste/py38/recipe/build.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -ex + +BUILD_CONFIG=Release + +# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) +# because PETSc already accepted MPICH version during conda solve +cd ${PREFIX}/include +patch -t -p1 < /tmp/patches/petsc.patch + +cd ${PREFIX}/lib/cmake/vtk-7.1 +patch -t -p1 < /tmp/patches/vtk.patch + +# Modify pip environment for chaste_codegen +export PIP_NO_DEPENDENCIES="False" +export PIP_NO_INDEX="False" + +cd ${PREFIX} +mkdir build +cd build || exit + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ + -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ + -DCMAKE_PREFIX_PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DBUILD_SHARED_LIBS=ON \ + -DBOOST_ROOT="${PREFIX}" \ + -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DVTK_DIR=${PREFIX} \ + -DXERCESC_INCLUDE="${PREFIX}/include" \ + -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ + -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ + $SRC_DIR + +# Revert pip environment settings +export PIP_NO_DEPENDENCIES="True" +export PIP_NO_INDEX="True" + +make chaste_project_PyChaste -j${CPU_COUNT} +make project_PyChaste_Python -j${CPU_COUNT} +#make install -j${CPU_COUNT} + +cd projects/PyChaste/python +pip install . --prefix=${PREFIX} + +# Cleanup +cd ${PREFIX}/build +rm -rf cell_based/CMakeFiles +rm -rf global/CMakeFiles +rm -rf io/CMakeFiles +rm -rf linalg/CMakeFiles +rm -rf mesh/CMakeFiles +rm -rf ode/CMakeFiles +rm -rf pde/CMakeFiles +rm -rf python +rm -rf projects/PyChaste/CMakeFiles +rm -rf projects/PyChaste/python + +# The egg-info file is necessary because some packages +# need pkg_resources to be able to find chaste. +# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects + +cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < + Chaste is a general purpose simulation package for computational biology. + dev_url: https://github.com/Chaste/Chaste + doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py38/recipe/patches/petsc.patch b/infra/conda/chaste/py38/recipe/patches/petsc.patch new file mode 100644 index 00000000..c00aca46 --- /dev/null +++ b/infra/conda/chaste/py38/recipe/patches/petsc.patch @@ -0,0 +1,13 @@ +--- a/petscsys.h ++++ b/petscsys.h +@@ -233,8 +233,8 @@ + #elif defined(PETSC_HAVE_MPICH_NUMVERSION) + # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) + # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" +-# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) +-# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" ++//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) ++//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" + # endif + #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) + # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py38/recipe/patches/vtk.patch b/infra/conda/chaste/py38/recipe/patches/vtk.patch new file mode 100644 index 00000000..a61d7b14 --- /dev/null +++ b/infra/conda/chaste/py38/recipe/patches/vtk.patch @@ -0,0 +1,13 @@ +--- a/VTKConfig.cmake ++++ b/VTKConfig.cmake +@@ -25,8 +25,8 @@ + if (CMAKE_VERSION VERSION_LESS "3.1") + message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") + endif() +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED 11) ++ set(CMAKE_CXX_STANDARD 17) ++ set(CMAKE_CXX_STANDARD_REQUIRED 17) + endif() + + # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml b/infra/conda/chaste/py39/.ci_support/linux_64_python3.9.____cpython.yaml similarity index 100% rename from infra/conda/chaste/.ci_support/linux_64_python3.9.____cpython.yaml rename to infra/conda/chaste/py39/.ci_support/linux_64_python3.9.____cpython.yaml diff --git a/infra/conda/chaste/py39/.gitignore b/infra/conda/chaste/py39/.gitignore new file mode 100755 index 00000000..c89ecb7d --- /dev/null +++ b/infra/conda/chaste/py39/.gitignore @@ -0,0 +1,3 @@ +*.pyc + +build_artifacts diff --git a/infra/conda/chaste/py39/.scripts/build_steps.sh b/infra/conda/chaste/py39/.scripts/build_steps.sh new file mode 100755 index 00000000..3da46528 --- /dev/null +++ b/infra/conda/chaste/py39/.scripts/build_steps.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 + +export FEEDSTOCK_ROOT='/home/conda/feedstock_root' +export RECIPE_ROOT='/home/conda/recipe_root' + +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" + +ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" +mkdir -p "${ARTIFACTS}" + +DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" +rm -f "${DONE_CANARY}" + +docker info + +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" +docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ + -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + "${DOCKER_IMAGE}" \ + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" + +test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py39/LICENSE.txt b/infra/conda/chaste/py39/LICENSE.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py39/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/chaste/py39/build.sh b/infra/conda/chaste/py39/build.sh new file mode 100755 index 00000000..e6615a6d --- /dev/null +++ b/infra/conda/chaste/py39/build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -xeo pipefail + +export CONFIG='linux_64_python3.9.____cpython' +export CHASTE_GIT_BRANCH='develop' +export PYCHASTE_GIT_BRANCH='develop' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=2 + +.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py39/recipe/build.sh b/infra/conda/chaste/py39/recipe/build.sh new file mode 100755 index 00000000..41cfc230 --- /dev/null +++ b/infra/conda/chaste/py39/recipe/build.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -ex + +BUILD_CONFIG=Release + +# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) +# because PETSc already accepted MPICH version during conda solve +cd ${PREFIX}/include +patch -t -p1 < /tmp/patches/petsc.patch + +cd ${PREFIX}/lib/cmake/vtk-7.1 +patch -t -p1 < /tmp/patches/vtk.patch + +# Modify pip environment for chaste_codegen +export PIP_NO_DEPENDENCIES="False" +export PIP_NO_INDEX="False" + +cd ${PREFIX} +mkdir build +cd build || exit + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ + -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ + -DCMAKE_PREFIX_PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DBUILD_SHARED_LIBS=ON \ + -DBOOST_ROOT="${PREFIX}" \ + -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DVTK_DIR=${PREFIX} \ + -DXERCESC_INCLUDE="${PREFIX}/include" \ + -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ + -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ + $SRC_DIR + +# Revert pip environment settings +export PIP_NO_DEPENDENCIES="True" +export PIP_NO_INDEX="True" + +make chaste_project_PyChaste -j${CPU_COUNT} +make project_PyChaste_Python -j${CPU_COUNT} +#make install -j${CPU_COUNT} + +cd projects/PyChaste/python +pip install . --prefix=${PREFIX} + +# Cleanup +cd ${PREFIX}/build +rm -rf cell_based/CMakeFiles +rm -rf global/CMakeFiles +rm -rf io/CMakeFiles +rm -rf linalg/CMakeFiles +rm -rf mesh/CMakeFiles +rm -rf ode/CMakeFiles +rm -rf pde/CMakeFiles +rm -rf python +rm -rf projects/PyChaste/CMakeFiles +rm -rf projects/PyChaste/python + +# The egg-info file is necessary because some packages +# need pkg_resources to be able to find chaste. +# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects + +cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < + Chaste is a general purpose simulation package for computational biology. + dev_url: https://github.com/Chaste/Chaste + doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py39/recipe/patches/petsc.patch b/infra/conda/chaste/py39/recipe/patches/petsc.patch new file mode 100644 index 00000000..c00aca46 --- /dev/null +++ b/infra/conda/chaste/py39/recipe/patches/petsc.patch @@ -0,0 +1,13 @@ +--- a/petscsys.h ++++ b/petscsys.h +@@ -233,8 +233,8 @@ + #elif defined(PETSC_HAVE_MPICH_NUMVERSION) + # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) + # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" +-# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) +-# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" ++//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) ++//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" + # endif + #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) + # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py39/recipe/patches/vtk.patch b/infra/conda/chaste/py39/recipe/patches/vtk.patch new file mode 100644 index 00000000..a61d7b14 --- /dev/null +++ b/infra/conda/chaste/py39/recipe/patches/vtk.patch @@ -0,0 +1,13 @@ +--- a/VTKConfig.cmake ++++ b/VTKConfig.cmake +@@ -25,8 +25,8 @@ + if (CMAKE_VERSION VERSION_LESS "3.1") + message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") + endif() +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED 11) ++ set(CMAKE_CXX_STANDARD 17) ++ set(CMAKE_CXX_STANDARD_REQUIRED 17) + endif() + + # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. From dc066ba0cbbb1aaf572cef93b2b1ce8637da178c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 08:51:18 +0000 Subject: [PATCH 14/53] #42 separate vtk py build scripts --- .../linux_64_python3.10.____cpython.yaml | 0 .../{ => 7.1.1/py310}/.scripts/build_steps.sh | 0 .../py310}/.scripts/run_docker_build.sh | 0 infra/conda/vtk/{ => 7.1.1/py310}/LICENSE.txt | 0 .../{build-py310.sh => 7.1.1/py310/build.sh} | 0 .../vtk/{ => 7.1.1/py310}/recipe/build.sh | 0 .../py310}/recipe/manual_vtk_test.py | 0 .../vtk/{ => 7.1.1/py310}/recipe/meta.yaml | 0 .../recipe/patches/netcdf4-nc4file.patch | 0 .../recipe/patches/netcdf4-nc4hdf.patch | 0 .../recipe/patches/netcdf4-nc_type.patch | 0 .../py310}/recipe/patches/vtk7.1.1.patch | 0 .../linux_64_python3.10.____cpython.yaml | 64 + .../linux_64_python3.11.____cpython.yaml | 0 .../vtk/7.1.1/py311/.scripts/build_steps.sh | 63 + .../7.1.1/py311/.scripts/run_docker_build.sh | 33 + infra/conda/vtk/7.1.1/py311/LICENSE.txt | 27 + .../{build-py311.sh => 7.1.1/py311/build.sh} | 0 infra/conda/vtk/7.1.1/py311/recipe/build.sh | 58 + .../vtk/7.1.1/py311/recipe/manual_vtk_test.py | 56 + infra/conda/vtk/7.1.1/py311/recipe/meta.yaml | 125 + .../recipe/patches/netcdf4-nc4file.patch | 11 + .../py311/recipe/patches/netcdf4-nc4hdf.patch | 11 + .../recipe/patches/netcdf4-nc_type.patch | 11 + .../7.1.1/py311/recipe/patches/vtk7.1.1.patch | 2251 +++++++++++++++++ 25 files changed, 2710 insertions(+) rename infra/conda/vtk/{ => 7.1.1/py310}/.ci_support/linux_64_python3.10.____cpython.yaml (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/.scripts/build_steps.sh (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/.scripts/run_docker_build.sh (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/LICENSE.txt (100%) rename infra/conda/vtk/{build-py310.sh => 7.1.1/py310/build.sh} (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/build.sh (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/manual_vtk_test.py (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/meta.yaml (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/patches/netcdf4-nc4file.patch (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/patches/netcdf4-nc4hdf.patch (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/patches/netcdf4-nc_type.patch (100%) rename infra/conda/vtk/{ => 7.1.1/py310}/recipe/patches/vtk7.1.1.patch (100%) create mode 100644 infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml rename infra/conda/vtk/{ => 7.1.1/py311}/.ci_support/linux_64_python3.11.____cpython.yaml (100%) create mode 100755 infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh create mode 100755 infra/conda/vtk/7.1.1/py311/.scripts/run_docker_build.sh create mode 100644 infra/conda/vtk/7.1.1/py311/LICENSE.txt rename infra/conda/vtk/{build-py311.sh => 7.1.1/py311/build.sh} (100%) create mode 100755 infra/conda/vtk/7.1.1/py311/recipe/build.sh create mode 100644 infra/conda/vtk/7.1.1/py311/recipe/manual_vtk_test.py create mode 100755 infra/conda/vtk/7.1.1/py311/recipe/meta.yaml create mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch create mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch create mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch create mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch diff --git a/infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/vtk/7.1.1/py310/.ci_support/linux_64_python3.10.____cpython.yaml similarity index 100% rename from infra/conda/vtk/.ci_support/linux_64_python3.10.____cpython.yaml rename to infra/conda/vtk/7.1.1/py310/.ci_support/linux_64_python3.10.____cpython.yaml diff --git a/infra/conda/vtk/.scripts/build_steps.sh b/infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh similarity index 100% rename from infra/conda/vtk/.scripts/build_steps.sh rename to infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh diff --git a/infra/conda/vtk/.scripts/run_docker_build.sh b/infra/conda/vtk/7.1.1/py310/.scripts/run_docker_build.sh similarity index 100% rename from infra/conda/vtk/.scripts/run_docker_build.sh rename to infra/conda/vtk/7.1.1/py310/.scripts/run_docker_build.sh diff --git a/infra/conda/vtk/LICENSE.txt b/infra/conda/vtk/7.1.1/py310/LICENSE.txt similarity index 100% rename from infra/conda/vtk/LICENSE.txt rename to infra/conda/vtk/7.1.1/py310/LICENSE.txt diff --git a/infra/conda/vtk/build-py310.sh b/infra/conda/vtk/7.1.1/py310/build.sh similarity index 100% rename from infra/conda/vtk/build-py310.sh rename to infra/conda/vtk/7.1.1/py310/build.sh diff --git a/infra/conda/vtk/recipe/build.sh b/infra/conda/vtk/7.1.1/py310/recipe/build.sh similarity index 100% rename from infra/conda/vtk/recipe/build.sh rename to infra/conda/vtk/7.1.1/py310/recipe/build.sh diff --git a/infra/conda/vtk/recipe/manual_vtk_test.py b/infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py similarity index 100% rename from infra/conda/vtk/recipe/manual_vtk_test.py rename to infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py diff --git a/infra/conda/vtk/recipe/meta.yaml b/infra/conda/vtk/7.1.1/py310/recipe/meta.yaml similarity index 100% rename from infra/conda/vtk/recipe/meta.yaml rename to infra/conda/vtk/7.1.1/py310/recipe/meta.yaml diff --git a/infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch b/infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc4file.patch similarity index 100% rename from infra/conda/vtk/recipe/patches/netcdf4-nc4file.patch rename to infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc4file.patch diff --git a/infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch b/infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc4hdf.patch similarity index 100% rename from infra/conda/vtk/recipe/patches/netcdf4-nc4hdf.patch rename to infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc4hdf.patch diff --git a/infra/conda/vtk/recipe/patches/netcdf4-nc_type.patch b/infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc_type.patch similarity index 100% rename from infra/conda/vtk/recipe/patches/netcdf4-nc_type.patch rename to infra/conda/vtk/7.1.1/py310/recipe/patches/netcdf4-nc_type.patch diff --git a/infra/conda/vtk/recipe/patches/vtk7.1.1.patch b/infra/conda/vtk/7.1.1/py310/recipe/patches/vtk7.1.1.patch similarity index 100% rename from infra/conda/vtk/recipe/patches/vtk7.1.1.patch rename to infra/conda/vtk/7.1.1/py310/recipe/patches/vtk7.1.1.patch diff --git a/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml new file mode 100644 index 00000000..fe09c1bb --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml @@ -0,0 +1,64 @@ +cdt_name: +- cos7 +channel_sources: +- pychaste +- conda-forge +- bioconda +channel_targets: +- pychaste main +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - fortran_compiler_version + +boostcpp: +- '>=1.68,<1.76' +expat: +- '2' +freetype: +- '2' +hdf5: +- '>=1.10,<1.11' +jsoncpp: +- '1.9' +jpeg: +- '9' +libpng: +- '1.6' +libtiff: +- '4' +libxml2: +- '2' +metis: +- '>=4' +mpich: +- '>=3' +parmetis: +- '>=4' +petsc: +- '>=3.12,<3.17' +sundials: +- '>=3.0,<6.0' +vtk: +- 7.1.1 +xercesc: +- '>=3' +zlib: +- '1' diff --git a/infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml b/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.11.____cpython.yaml similarity index 100% rename from infra/conda/vtk/.ci_support/linux_64_python3.11.____cpython.yaml rename to infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.11.____cpython.yaml diff --git a/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh b/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh new file mode 100755 index 00000000..f5198b92 --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 + +export FEEDSTOCK_ROOT='/home/conda/feedstock_root' +export RECIPE_ROOT='/home/conda/recipe_root' + +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" + +ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" +mkdir -p "${ARTIFACTS}" + +DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" +rm -f "${DONE_CANARY}" + +docker info + +DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" +docker pull "${DOCKER_IMAGE}" + +export HOST_USER_ID=$(id -u) + +docker run --rm -it \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG="${CONFIG}" \ + -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ + -e CPU_COUNT="${CPU_COUNT}" \ + -e HOST_USER_ID="${HOST_USER_ID}" \ + "${DOCKER_IMAGE}" \ + bash "/home/conda/feedstock_root/.scripts/build_steps.sh" + +test -f "${DONE_CANARY}" diff --git a/infra/conda/vtk/7.1.1/py311/LICENSE.txt b/infra/conda/vtk/7.1.1/py311/LICENSE.txt new file mode 100644 index 00000000..2ec51d75 --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/infra/conda/vtk/build-py311.sh b/infra/conda/vtk/7.1.1/py311/build.sh similarity index 100% rename from infra/conda/vtk/build-py311.sh rename to infra/conda/vtk/7.1.1/py311/build.sh diff --git a/infra/conda/vtk/7.1.1/py311/recipe/build.sh b/infra/conda/vtk/7.1.1/py311/recipe/build.sh new file mode 100755 index 00000000..e2f8de66 --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/recipe/build.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +set -ex + +BUILD_CONFIG=Release + +mkdir build +cd build || exit + +export CFLAGS="${CFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" +export CXXFLAGS="${CXXFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" + +cmake .. \ + -Wno-dev \ + -DCMAKE_BUILD_TYPE=$BUILD_CONFIG \ + -DCMAKE_PREFIX_PATH:PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ + -DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \ + -DBUILD_DOCUMENTATION:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DVTK_ENABLE_VTKPYTHON:BOOL=OFF \ + -DVTK_WRAP_PYTHON:BOOL=ON \ + -DVTK_PYTHON_VERSION:STRING="${PY_VER}" \ + -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="${SP_DIR}" \ + -DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF \ + -DVTK_RENDERING_BACKEND=OpenGL2 \ + -DModule_vtkRenderingMatplotlib=ON \ + -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \ + -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \ + -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \ + -DVTK_USE_SYSTEM_PNG:BOOL=ON \ + -DVTK_USE_SYSTEM_JPEG:BOOL=ON \ + -DVTK_USE_SYSTEM_TIFF:BOOL=ON \ + -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \ + -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ + -DVTK_USE_SYSTEM_JSONCPP:BOOL=ON \ + -DVTK_USE_X:BOOL=ON \ + -DVTK_USE_CXX11_FEATURES=ON \ + -DVTK_Group_MPI=ON \ + -DMPIEXEC="${PREFIX}/bin/mpiexec" + +make -j${CPU_COUNT} +make install + +# The egg-info file is necessary because some packages, +# like mayavi, have a __requires__ in their __invtkRenderWindow::New()it__.py, +# which means pkg_resources needs to be able to find vtk. +# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects + +cat > $SP_DIR/vtk-$PKG_VERSION.egg-info < + The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, modeling, image processing, volume rendering, scientific visualization, and information visualization. + dev_url: https://gitlab.kitware.com/vtk/vtk + doc_url: https://vtk.org/documentation diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch new file mode 100644 index 00000000..b1a50faa --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c ++++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c +@@ -8,6 +8,8 @@ + COPYRIGHT file for copying and redistribution conditions. + */ + ++#define H5_USE_110_API ++ + #include "nc4internal.h" + #include "nc.h" + #include diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch new file mode 100644 index 00000000..197dc77a --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c ++++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c +@@ -13,6 +13,8 @@ + $Id: nc4hdf.c,v 1.273 2010/05/27 21:34:14 dmh Exp $ + */ + ++#define H5_USE_110_API ++ + #include "config.h" + #include "nc4internal.h" + #include diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch new file mode 100644 index 00000000..ba9e3f9e --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4internal.c ++++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4internal.c +@@ -380,7 +380,7 @@ + + /* Recursively hunt for a netCDF type id. */ + NC_TYPE_INFO_T * +-nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, nc_type target_nc_typeid) ++nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, hid_t target_nc_typeid) + { + NC_GRP_INFO_T *g; + NC_TYPE_INFO_T *type, *res; diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch new file mode 100644 index 00000000..cb95e48d --- /dev/null +++ b/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch @@ -0,0 +1,2251 @@ +unchanged: +--- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx ++++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx +@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) + // Help Tcl find the Tcl/Tk helper files. + const char* relative_dirs[] = + { ++ "../share/tcltk", ++ "../../share/tcltk", + "TclTk/lib", + ".." VTK_INSTALL_TCL_DIR, + 0 +unchanged: +--- a/CMake/vtkModuleMacros.cmake ++++ b/CMake/vtkModuleMacros.cmake +@@ -417,8 +417,8 @@ + function(vtk_target_name _name) + get_property(_type TARGET ${_name} PROPERTY TYPE) + if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) +- set_property(TARGET ${_name} PROPERTY VERSION 1) +- set_property(TARGET ${_name} PROPERTY SOVERSION 1) ++ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p.${VTK_BUILD_VERSION}) ++ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p) + endif() + if("${_name}" MATCHES "^[Vv][Tt][Kk]") + set(_vtk "") +unchanged: +--- a/Rendering/Tk/CMakeLists.txt ++++ b/Rendering/Tk/CMakeLists.txt +@@ -118,7 +118,7 @@ + vtk_target_install(vtkRenderingPythonTkWidgets) + + set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME +- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) ++ vtkRenderingPythonTkWidgets) + + set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) + if(VTK_USE_X) +unchanged: +--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h ++++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +@@ -156,6 +156,10 @@ + * to implement IsAvailable. + */ + static Availability CheckMPLAvailability(); ++ static void DisableMPL() ++ { ++ MPLMathTextAvailable = UNAVAILABLE; ++ }; + + //@{ + /** +unchanged: +--- a/IO/SQL/vtkSQLiteDatabase.cxx ++++ b/IO/SQL/vtkSQLiteDatabase.cxx +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + vtkStandardNewMacro(vtkSQLiteDatabase); + +@@ -307,15 +307,15 @@ + } + } + +- int result = vtk_sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); ++ int result = sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); + +- if (result != VTK_SQLITE_OK) ++ if (result != SQLITE_OK) + { + vtkDebugMacro(<<"SQLite open() failed. Error code is " + << result << " and message is " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + +- vtk_sqlite3_close(this->SQLiteInstance); ++ sqlite3_close(this->SQLiteInstance); + return false; + } + else +@@ -334,8 +334,8 @@ + } + else + { +- int result = vtk_sqlite3_close(this->SQLiteInstance); +- if (result != VTK_SQLITE_OK) ++ int result = sqlite3_close(this->SQLiteInstance); ++ if (result != SQLITE_OK) + { + vtkWarningMacro(<< "Close(): SQLite returned result code " << result); + } +@@ -368,13 +368,13 @@ + } + + vtkSQLQuery *query = this->GetQueryInstance(); +- query->SetQuery("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"); ++ query->SetQuery("SELECT name FROM sqlite3_master WHERE type='table' ORDER BY name"); + bool status = query->Execute(); + + if (!status) + { + vtkErrorMacro(<< "GetTables(): Database returned error: " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + query->Delete(); + return this->Tables; + } +@@ -403,7 +403,7 @@ + if (!status) + { + vtkErrorMacro(<< "GetRecord(" << table << "): Database returned error: " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + query->Delete(); + return NULL; + } +@@ -467,10 +467,10 @@ + // ---------------------------------------------------------------------- + bool vtkSQLiteDatabase::HasError() + { +- return (vtk_sqlite3_errcode(this->SQLiteInstance)!=VTK_SQLITE_OK); ++ return (sqlite3_errcode(this->SQLiteInstance)!=SQLITE_OK); + } + + const char* vtkSQLiteDatabase::GetLastErrorText() + { +- return vtk_sqlite3_errmsg(this->SQLiteInstance); ++ return sqlite3_errmsg(this->SQLiteInstance); + } +unchanged: +--- a/IO/SQL/vtkSQLiteDatabase.h ++++ b/IO/SQL/vtkSQLiteDatabase.h +@@ -52,7 +52,7 @@ + class vtkSQLQuery; + class vtkSQLiteQuery; + class vtkStringArray; +-struct vtk_sqlite3; ++struct sqlite3; + + class VTKIOSQL_EXPORT vtkSQLiteDatabase : public vtkSQLDatabase + { +@@ -167,7 +167,7 @@ + virtual bool ParseURL(const char* url); + + private: +- vtk_sqlite3 *SQLiteInstance; ++ sqlite3 *SQLiteInstance; + + // We want this to be private, a user of this class + // should not be setting this for any reason +unchanged: +--- a/IO/SQL/vtkSQLiteQuery.cxx ++++ b/IO/SQL/vtkSQLiteQuery.cxx +@@ -25,7 +25,7 @@ + #include "vtkVariant.h" + #include "vtkVariantArray.h" + +-#include ++#include + + #include + +@@ -43,7 +43,7 @@ + { + this->Statement = NULL; + this->InitialFetch = true; +- this->InitialFetchResult=VTK_SQLITE_DONE; ++ this->InitialFetchResult=SQLITE_DONE; + this->LastErrorText = NULL; + this->TransactionInProgress = false; + } +@@ -61,7 +61,7 @@ + { + if (this->Database != NULL) + { +- vtk_sqlite3_finalize(this->Statement); ++ sqlite3_finalize(this->Statement); + this->Statement = NULL; + } + } +@@ -128,8 +128,8 @@ + if (this->Statement) + { + vtkDebugMacro(<<"Finalizing old statement"); +- int finalizeStatus = vtk_sqlite3_finalize(this->Statement); +- if (finalizeStatus != VTK_SQLITE_OK) ++ int finalizeStatus = sqlite3_finalize(this->Statement); ++ if (finalizeStatus != SQLITE_OK) + { + vtkWarningMacro(<<"SetQuery(): Finalize returned unexpected code " + << finalizeStatus); +@@ -148,19 +148,19 @@ + return false; + } + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + const char *unused_statement; + +- int prepareStatus = vtk_sqlite3_prepare_v2(db, ++ int prepareStatus = sqlite3_prepare_v2(db, + this->Query, + static_cast(strlen(this->Query)), + &this->Statement, + &unused_statement); + +- if (prepareStatus != VTK_SQLITE_OK) ++ if (prepareStatus != SQLITE_OK) + { +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); +- vtkWarningMacro(<<"SetQuery(): vtk_sqlite3_prepare_v2() failed with error message " ++ this->SetLastErrorText(sqlite3_errmsg(db)); ++ vtkWarningMacro(<<"SetQuery(): sqlite3_prepare_v2() failed with error message " + << this->GetLastErrorText() + << " on statement: '" + << this->Query << "'"); +@@ -191,31 +191,31 @@ + } + else + { +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + + vtkDebugMacro(<<"Execute(): Query ready to execute."); + + this->InitialFetch = true; +- int result = vtk_sqlite3_step(this->Statement); ++ int result = sqlite3_step(this->Statement); + this->InitialFetchResult = result; + +- if (result == VTK_SQLITE_DONE) ++ if (result == SQLITE_DONE) + { + this->SetLastErrorText(NULL); + this->Active = true; + return true; + } +- else if (result != VTK_SQLITE_ROW) ++ else if (result != SQLITE_ROW) + { + vtkSQLiteDatabase *dbContainer = + vtkSQLiteDatabase::SafeDownCast(this->Database); + assert(dbContainer != NULL); + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); +- vtkDebugMacro(<< "Execute(): vtk_sqlite3_step() returned error message " ++ this->SetLastErrorText(sqlite3_errmsg(db)); ++ vtkDebugMacro(<< "Execute(): sqlite3_step() returned error message " + << this->GetLastErrorText()); + this->Active = false; + return false; +@@ -236,7 +236,7 @@ + } + else + { +- return vtk_sqlite3_column_count(this->Statement); ++ return sqlite3_column_count(this->Statement); + } + } + +@@ -256,7 +256,7 @@ + } + else + { +- return vtk_sqlite3_column_name(this->Statement, column); ++ return sqlite3_column_name(this->Statement, column); + } + } + +@@ -276,22 +276,22 @@ + } + else + { +- switch (vtk_sqlite3_column_type(this->Statement, column)) ++ switch (sqlite3_column_type(this->Statement, column)) + { +- case VTK_SQLITE_INTEGER: ++ case SQLITE_INTEGER: + return VTK_INT; +- case VTK_SQLITE_FLOAT: ++ case SQLITE_FLOAT: + return VTK_FLOAT; +- case VTK_SQLITE_TEXT: ++ case SQLITE_TEXT: + return VTK_STRING; +- case VTK_SQLITE_BLOB: ++ case SQLITE_BLOB: + return VTK_STRING; // until we have a BLOB type of our own +- case VTK_SQLITE_NULL: ++ case SQLITE_NULL: + return VTK_VOID; // ??? what makes sense here? + default: + { + vtkErrorMacro(<<"GetFieldType(): Unknown data type " +- << vtk_sqlite3_column_type(this->Statement, column) ++ << sqlite3_column_type(this->Statement, column) + <<" from SQLite."); + return VTK_VOID; + } +@@ -312,7 +312,7 @@ + { + vtkDebugMacro(<<"NextRow(): Initial fetch being handled."); + this->InitialFetch = false; +- if (this->InitialFetchResult == VTK_SQLITE_DONE) ++ if (this->InitialFetchResult == SQLITE_DONE) + { + return false; + } +@@ -323,12 +323,12 @@ + } + else + { +- int result = vtk_sqlite3_step(this->Statement); +- if (result == VTK_SQLITE_DONE) ++ int result = sqlite3_step(this->Statement); ++ if (result == SQLITE_DONE) + { + return false; + } +- else if (result == VTK_SQLITE_ROW) ++ else if (result == SQLITE_ROW) + { + return true; + } +@@ -336,8 +336,8 @@ + { + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); ++ sqlite3 *db = dbContainer->SQLiteInstance; ++ this->SetLastErrorText(sqlite3_errmsg(db)); + vtkErrorMacro(<<"NextRow(): Database returned error code " + << result << " with the following message: " + << this->GetLastErrorText()); +@@ -363,33 +363,33 @@ + } + else + { +- switch (vtk_sqlite3_column_type(this->Statement, column)) ++ switch (sqlite3_column_type(this->Statement, column)) + { +- case VTK_SQLITE_INTEGER: +- return vtkVariant(vtk_sqlite3_column_int(this->Statement, column)); ++ case SQLITE_INTEGER: ++ return vtkVariant(sqlite3_column_int(this->Statement, column)); + +- case VTK_SQLITE_FLOAT: +- return vtkVariant(vtk_sqlite3_column_double(this->Statement, column)); ++ case SQLITE_FLOAT: ++ return vtkVariant(sqlite3_column_double(this->Statement, column)); + +- case VTK_SQLITE_TEXT: ++ case SQLITE_TEXT: + { + std::ostringstream str; +- str << vtk_sqlite3_column_text(this->Statement, column); ++ str << sqlite3_column_text(this->Statement, column); + return vtkVariant(vtkStdString(str.str())); + } + +- case VTK_SQLITE_BLOB: ++ case SQLITE_BLOB: + { + // This is a hack ... by passing the BLOB to vtkStdString with an explicit + // byte count, we ensure that the string will store all of the BLOB's bytes, + // even if there are NULL values. + + return vtkVariant(vtkStdString( +- static_cast(vtk_sqlite3_column_blob(this->Statement, column)), +- vtk_sqlite3_column_bytes(this->Statement, column))); ++ static_cast(sqlite3_column_blob(this->Statement, column)), ++ sqlite3_column_bytes(this->Statement, column))); + } + +- case VTK_SQLITE_NULL: ++ case SQLITE_NULL: + default: + return vtkVariant(); + } +@@ -420,11 +420,11 @@ + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = true; + this->SetLastErrorText(NULL); +@@ -448,7 +448,7 @@ + { + if (this->Statement) + { +- vtk_sqlite3_finalize(this->Statement); ++ sqlite3_finalize(this->Statement); + this->Statement = NULL; + } + +@@ -460,11 +460,11 @@ + + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = false; + this->SetLastErrorText(NULL); +@@ -496,11 +496,11 @@ + + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = false; + this->SetLastErrorText(NULL); +@@ -644,14 +644,14 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } +- int status = vtk_sqlite3_bind_int(this->Statement, index+1, value); ++ int status = sqlite3_bind_int(this->Statement, index+1, value); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_int returned error: " << status; ++ errormessage << "sqlite3_bind_int returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } +- int status = vtk_sqlite3_bind_int(this->Statement, index+1, static_cast(value)); ++ int status = sqlite3_bind_int(this->Statement, index+1, static_cast(value)); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_int64 returned error: " << status; ++ errormessage << "sqlite3_bind_int64 returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -702,15 +702,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_bind_double(this->Statement, index+1, value); ++ int status = sqlite3_bind_double(this->Statement, index+1, value); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_double returned error: " << status; ++ errormessage << "sqlite3_bind_double returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -731,15 +731,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_bind_text(this->Statement, index+1, value, length, VTK_SQLITE_TRANSIENT); ++ int status = sqlite3_bind_text(this->Statement, index+1, value, length, SQLITE_TRANSIENT); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_text returned error: " << status; ++ errormessage << "sqlite3_bind_text returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -760,20 +760,20 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + + int status = +- vtk_sqlite3_bind_blob(this->Statement, ++ sqlite3_bind_blob(this->Statement, + index+1, + data, + length, +- VTK_SQLITE_TRANSIENT); ++ SQLITE_TRANSIENT); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_blob returned error: " << status; ++ errormessage << "sqlite3_bind_blob returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -794,15 +794,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_clear_bindings(this->Statement); ++ int status = sqlite3_clear_bindings(this->Statement); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_clear_bindings returned error: " << status; ++ errormessage << "sqlite3_clear_bindings returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +unchanged: +--- a/IO/SQL/vtkSQLiteQuery.h ++++ b/IO/SQL/vtkSQLiteQuery.h +@@ -50,7 +50,7 @@ + class vtkSQLiteDatabase; + class vtkVariant; + class vtkVariantArray; +-struct vtk_sqlite3_stmt; ++struct sqlite3_stmt; + + class VTKIOSQL_EXPORT vtkSQLiteQuery : public vtkSQLQuery + { +@@ -175,7 +175,7 @@ + vtkSQLiteQuery(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; + void operator=(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; + +- vtk_sqlite3_stmt *Statement; ++ sqlite3_stmt *Statement; + bool InitialFetch; + int InitialFetchResult; + char *LastErrorText; +unchanged: +--- a/ThirdParty/sqlite/CMakeLists.txt ++++ b/ThirdParty/sqlite/CMakeLists.txt +@@ -1,4 +1,4 @@ + set(vtksqlite_THIRD_PARTY 1) +-set(vtksqlite_LIBRARIES vtksqlite) ++set(vtksqlite_LIBRARIES sqlite3) + vtk_module_export_info() +-add_subdirectory(vtksqlite) ++ +unchanged: +--- a/Parallel/MPI4Py/CMakeLists.txt ++++ b/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +unchanged: +--- a/Parallel/MPI4Py/module.cmake ++++ b/Parallel/MPI4Py/module.cmake +@@ -2,8 +2,6 @@ + vtk_module(vtkParallelMPI4Py + GROUPS + MPI +- COMPILE_DEPENDS +- vtkmpi4py + EXCLUDE_FROM_TCL_WRAPPING + EXCLUDE_FROM_JAVA_WRAPPING + KIT +@@ -14,4 +12,4 @@ + PRIVATE_DEPENDS + vtkParallelMPI + ) +-endif () +\ No newline at end of file ++endif () +unchanged: +--- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx ++++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +@@ -1113,7 +1113,10 @@ + vtkIdType cellsPerNode = numTotalCells / nprocs; + + vtkIdList **sendCells = new vtkIdList * [ nprocs ]; +- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ ++ if (sizeof(vtkIdList *) * nprocs > 0) { ++ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ } + + if (numConsumers == nprocs - 1) + { +@@ -1598,7 +1601,9 @@ + // Exchange int arrays + + float **recvArrays = new float * [nprocs]; +- memset(recvArrays, 0, sizeof(float *) * nprocs); ++ if (sizeof(float *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(float *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -1720,7 +1725,9 @@ + // Exchange int arrays + + vtkIdType **recvArrays = new vtkIdType * [nprocs]; +- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ if (sizeof(vtkIdType *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -2789,7 +2796,9 @@ + + unsigned char *vals = new unsigned char [npoints]; + +- memset(vals, val, npoints); ++ if (npoints > 0) { ++ memset(vals, val, npoints); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -2809,7 +2818,9 @@ + + unsigned char *vals = new unsigned char [ncells]; + +- memset(vals, val, ncells); ++ if (ncells > 0) { ++ memset(vals, val, ncells); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -3008,7 +3019,9 @@ + vtkIdType nGridPoints = grid->GetNumberOfPoints(); + + vtkIdType *numPointsOutside = new vtkIdType [nprocs]; +- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ if (sizeof(vtkIdType) * nprocs > 0) { ++ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ } + + vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); + globalIds->SetNumberOfValues(nGridPoints); +@@ -3090,10 +3103,16 @@ + // global ID back? + + vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; +- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ ++ if (sizeof(vtkFloatArray *) * nprocs > 0) { ++ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ } + + vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; +- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + vtkIdType *next = new vtkIdType [nprocs]; + vtkIdType *next3 = new vtkIdType [nprocs]; +@@ -3268,7 +3287,9 @@ + { + // There are no cells in my assigned region + +- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + return gids; + } +@@ -3473,7 +3494,10 @@ + std::multimap::iterator mapIt; + + vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; +- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { ++ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ } + + for (int i=0; iGetNumberOfPoints(); + + vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; +- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs) { ++ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + if (numPoints < 1) + { +unchanged: +--- a/Examples/Infovis/Cxx/CMakeLists.txt ++++ b/Examples/Infovis/Cxx/CMakeLists.txt +@@ -48,15 +48,6 @@ + target_link_LIBRARIES(MultiView ${VTK_LIBRARIES}) + endif() + +-# If Qt is enabled include the QT based examples +-if(vtkGUISupportQt_LOADED AND vtkViewsQt_LOADED) +- add_subdirectory(EasyView) +- add_subdirectory(CustomLinkView) +- if(vtkIOSQL_LOADED) +- add_subdirectory(StatsView) +- endif() +-endif() +- + if(vtkInfovisParallel_LOADED) + add_executable(ParallelBFS ParallelBFS.cxx) + find_package(MPI REQUIRED) +unchanged: +--- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt ++++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt +@@ -80,6 +80,8 @@ if(APPLE) + set(JAVAC_OPTIONS -J-Xmx512m) + endif() + ++set(JAVAC_OPTIONS -J-Xmx1024m) ++ + get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) + foreach(module IN LISTS java_modules) + if(NOT ${module}_EXCLUDE_FROM_WRAPPING) +unchanged: +--- VTK-6.3.0.orig/CMake/vtkJavaWrapping.cmake ++++ VTK-6.3.0/CMake/vtkJavaWrapping.cmake +@@ -79,7 +79,7 @@ function(vtk_add_java_wrapping module_na + install(TARGETS ${module_name}Java + EXPORT ${VTK_INSTALL_EXPORT_NAME} + RUNTIME DESTINATION ${VTK_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries +- LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries ++ LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/jni COMPONENT RuntimeLibraries + ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development) + endif() + endfunction() +unchanged: +--- b/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -200,7 +200,7 @@ + endif() + + # default to not using the system GLEW as ours has fixes in it right now +-set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) ++set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) + + set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) + +@@ -540,9 +540,7 @@ + + # The doxygen documentation needs to be aware of all modules. + option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) +-if(BUILD_DOCUMENTATION) +- add_subdirectory(Utilities/Doxygen) +-endif() ++add_subdirectory(Utilities/Doxygen) + + # If python wrapping and testing is enabled then add driver scripts to run + # tests. Note: Many pythong tests used to be automatically converted from TCL +unchanged: +--- a/Rendering/OpenGL2/CMakeLists.txt ++++ b/Rendering/OpenGL2/CMakeLists.txt +@@ -353,7 +353,7 @@ + vtk_opengl_link(${vtk-module}) + if(VTK_USE_X) + vtk_module_link_libraries(${vtk-module} +- LINK_PUBLIC ${X11_LIBRARIES} ${X11_Xt_LIB}) ++ LINK_PUBLIC ${GLEW_LIBRARY} ${X11_LIBRARIES} ${X11_Xt_LIB}) + elseif(VTK_USE_COCOA) + vtk_module_link_libraries(${vtk-module} LINK_PUBLIC "-framework Cocoa") + endif() +unchanged: +--- b/Utilities/Doxygen/CMakeLists.txt ++++ b/Utilities/Doxygen/CMakeLists.txt +@@ -1,69 +1,79 @@ + # + # Build the documentation + # +-find_package(Doxygen REQUIRED) +-find_package(Perl REQUIRED) +-find_package(HTMLHelp) ++if (BUILD_DOCUMENTATION) ++ find_package(Doxygen REQUIRED) ++ find_package(Perl REQUIRED) ++ find_package(HTMLHelp) + +-option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) +-option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) +-option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) +-mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) +-if(DOXYGEN_SHORT_NAMES) +- set(DOXYGEN_SHORT_NAMES YES) +-else() +- set(DOXYGEN_SHORT_NAMES NO) +-endif() +-if(DOXYGEN_GENERATE_HTMLHELP) +- set(DOXYGEN_GENERATE_HTMLHELP YES) +-else() +- set(DOXYGEN_GENERATE_HTMLHELP NO) +-endif() +- +-# +-# Configure the script and the doxyfile, then add target +-# +-set(HAVE_DOT_YESNO NO) +-if(DOT) +- set(HAVE_DOT_YESNO YES) +- if(NOT DOT_PATH) +- get_filename_component(DOT_PATH ${DOT} PATH) ++ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) ++ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) ++ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) ++ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) ++ if(DOXYGEN_SHORT_NAMES) ++ set(DOXYGEN_SHORT_NAMES YES) ++ else() ++ set(DOXYGEN_SHORT_NAMES NO) + endif() +-endif() +- +-# Build up a list of all module source directories. Note that this should be +-# all source directories and so does not use the normal variables. +-unset(VTK_MODULE_DIRS_DOXYGEN) +-file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") +-foreach(module ${src}) +- get_filename_component(module_BASE ${module} PATH) +- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") +- # Skip the utilities and third parties directories. ++ if(DOXYGEN_GENERATE_HTMLHELP) ++ set(DOXYGEN_GENERATE_HTMLHELP YES) + else() +- # Use both the source and binary directories, this ensures that +- # generated files will be included, but they may then be architecture, +- # build configuration and/or compiler specific. All source directories +- # are included whether the module is enabled or not. +- set(VTK_MODULE_DIRS_DOXYGEN +- "${VTK_MODULE_DIRS_DOXYGEN} ++ set(DOXYGEN_GENERATE_HTMLHELP NO) ++ endif() ++ ++ # ++ # Configure the script and the doxyfile, then add target ++ # ++ set(HAVE_DOT_YESNO NO) ++ if(DOT) ++ set(HAVE_DOT_YESNO YES) ++ if(NOT DOT_PATH) ++ get_filename_component(DOT_PATH ${DOT} PATH) ++ endif() ++ endif() ++ ++ # Build up a list of all module source directories. Note that this should be ++ # all source directories and so does not use the normal variables. ++ unset(VTK_MODULE_DIRS_DOXYGEN) ++ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") ++ foreach(module ${src}) ++ get_filename_component(module_BASE ${module} PATH) ++ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") ++ # Skip the utilities and third parties directories. ++ else() ++ # Use both the source and binary directories, this ensures that ++ # generated files will be included, but they may then be architecture, ++ # build configuration and/or compiler specific. All source directories ++ # are included whether the module is enabled or not. ++ set(VTK_MODULE_DIRS_DOXYGEN ++ "${VTK_MODULE_DIRS_DOXYGEN} + \"${VTK_SOURCE_DIR}/${module_BASE}\" + \"${VTK_BINARY_DIR}/${module_BASE}\"") +- endif() +-endforeach() ++ endif() ++ endforeach() ++ ++ FIND_PATH(MATHJAX_CODEFILE MathJax.js ++ PATHS ++ /usr/share/mathjax/ ++ /usr/share/javascript/ ++ /usr/share/javascript/mathjax/ ++ ) ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ @ONLY) ++ ++ add_custom_target(DoxygenDoc ++ ${CMAKE_COMMAND} ++ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) + +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) +- +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- @ONLY) +- +-add_custom_target(DoxygenDoc +- ${CMAKE_COMMAND} +- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) ++endif() + + if(NOT VTK_INSTALL_NO_DOCUMENTATION) + macro(__vtk_install_documentation_files glob) +unchanged: +--- a/Utilities/Doxygen/doxyfile.in ++++ b/Utilities/Doxygen/doxyfile.in +@@ -19,6 +19,9 @@ + GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" + + PDF_HYPERLINKS = YES ++USE_MATHJAX = YES ++MATHJAX_RELPATH = @MATHJAX_CODEFILE@ ++ + + HAVE_DOT = @HAVE_DOT_YESNO@ + DOT_PATH = "@DOT_PATH@" +unchanged: +--- a/Wrapping/Java/CMakeLists.txt ++++ b/Wrapping/Java/CMakeLists.txt +@@ -259,7 +259,7 @@ + if(VTK_JAVA_SWT_COMPONENT) + set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} + rendering/SwtConeRendering +- ) ++q ) + endif() + endif() + +@@ -358,11 +358,10 @@ + COMMENT "Compiling Java Classes" + ) + +-# Create the JAR file containing all compiled classes and ++ + add_custom_command( +- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" +- -C ${VTK_BINARY_DIR}/java +- vtk ++ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list ++ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list + DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} + OUTPUT ${VTK_JAR_PATH}/vtk.jar + COMMENT "Java Archive" +unchanged: +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); +unchanged: +--- a/Utilities/Doxygen/doc_class2example.pl ++++ b/Utilities/Doxygen/doc_class2example.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2004-06-09 11:12:38 barre> + # + # Build cross-references between classes and examples +unchanged: +--- a/Utilities/Doxygen/doc_cleanhtml.pl ++++ b/Utilities/Doxygen/doc_cleanhtml.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-10-25 20:17:59 barre> + # + # Clean the HTML generated by Doxygen to remove some layout quicks +unchanged: +--- a/Utilities/Doxygen/doc_codematch.pl ++++ b/Utilities/Doxygen/doc_codematch.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-01-18 16:17:26 barre> + # + # Summary ? +unchanged: +--- a/Utilities/Doxygen/doc_contributors.pl ++++ b/Utilities/Doxygen/doc_contributors.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-11-01 15:33:04 barre> + # + # Get author and contributors. +unchanged: +--- a/Utilities/Doxygen/doc_header2doxygen.pl ++++ b/Utilities/Doxygen/doc_header2doxygen.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2011-01-16 21:15:53 barre> + # + # Convert VTK headers to doxygen format +unchanged: +--- a/Utilities/Doxygen/doc_index.pl ++++ b/Utilities/Doxygen/doc_index.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-11-21 17:40:48 barre> + # + # Build full-text index +unchanged: +--- a/Utilities/Doxygen/doc_rmpath.pl ++++ b/Utilities/Doxygen/doc_rmpath.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-10-05 11:49:40 barre> + # + # Remove path to intermediate Doxygen dir from html doc +unchanged: +--- a/Utilities/Doxygen/doc_version.pl ++++ b/Utilities/Doxygen/doc_version.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2006-11-15 13:25:02 barre> + # + # Extract VTK version and add it to documentation +unchanged: +--- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h ++++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h +@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv) || defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." +unchanged: +--- a/Wrapping/Python/vtk/numpy_interface/algorithms.py ++++ b/Wrapping/Python/vtk/numpy_interface/algorithms.py +@@ -197,7 +197,7 @@ + return dsa.NoneArray; + + if res is dsa.NoneArray: +- if max_dims is 1: ++ if max_dims == 1: + # Weird trick to make the array look like a scalar + max_dims = () + res = numpy.empty(max_dims) +unchanged: +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: +unchanged: +--- a/IO/MySQL/vtkMySQLDatabasePrivate.h ++++ b/IO/MySQL/vtkMySQLDatabasePrivate.h +@@ -7,6 +7,10 @@ + + #include "vtkIOMySQLModule.h" // For export macro + #include // needed for MYSQL typedefs ++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ ++ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 ++typedef bool my_bool; ++#endif + + class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate + { +unchanged: +--- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -273,8 +273,7 @@ + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) +unchanged: +--- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + namespace + { + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) +-vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) +unchanged: +--- vtk7-7.1.1+dfsg2.orig/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx ++++ vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx +@@ -52,7 +52,7 @@ + XdmfErrorMessage("Cannot Receive Message of Length = " << Msg->Length); + return(XDMF_FAIL); + } +- if(Msg->Data <= 0 ){ ++ if(!Msg->Data){ + XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << Msg->Length); + return(XDMF_FAIL); + } +@@ -66,7 +66,7 @@ + XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length); + return(XDMF_FAIL); + } +- if(Msg->Data <= 0 ){ ++ if(!Msg->Data){ + XdmfErrorMessage("Cannot Send Message from Data Buffer = " << Msg->Length); + return(XDMF_FAIL); + } +unchanged: +--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h ++++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h +@@ -66,7 +66,7 @@ + { + } + +- bool operator () ( const vtkIdType& a, const vtkIdType& b ) ++ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const + { + if (0 == this->Hierarchy) + { +unchanged: +--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx ++++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx +@@ -525,7 +525,7 @@ + { + public: + bool operator()(const vtkHierarchyNode & a, +- const vtkHierarchyNode & b) ++ const vtkHierarchyNode & b) const + { + if (a.Level != b.Level) + { +only in patch2: +unchanged: +--- a/CMake/FindFFMPEG.cmake ++++ b/CMake/FindFFMPEG.cmake +@@ -107,13 +107,14 @@ + FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) + FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) + FFMPEG_FIND(LIBAVUTIL avutil avutil.h) ++FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) + FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. + + SET(FFMPEG_FOUND "NO") + + # Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND, + # and FFMPEG_LIBAVUTIL_FOUND as they are optional. +-IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK) ++IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK) + + SET(FFMPEG_FOUND "YES") + +only in patch2: +unchanged: +--- a/IO/FFMPEG/CMakeLists.txt ++++ b/IO/FFMPEG/CMakeLists.txt +@@ -22,7 +22,7 @@ + ) + + set(_ffmpeg_libs ${FFMPEG_LIBAVFORMAT_LIBRARIES} ${FFMPEG_LIBAVCODEC_LIBRARIES} +- ${FFMPEG_LIBAVUTIL_LIBRARIES} ++ ${FFMPEG_LIBAVUTIL_LIBRARIES} ${FFMPEG_LIBSWRESAMPLE_LIBRARIES} + ) + + if(NOT VTK_FFMPEG_HAS_IMG_CONVERT) +only in patch2: +unchanged: +--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx ++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx +@@ -15,99 +15,77 @@ + + #include "vtkFFMPEGWriter.h" + ++#include "vtkErrorCode.h" + #include "vtkImageData.h" + #include "vtkObjectFactory.h" +-#include "vtkErrorCode.h" +-#include "vtkFFMPEGConfig.h" + +-extern "C" { +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +-# include +-#else +-# include +-#endif +- +-#ifndef VTK_FFMPEG_HAS_IMG_CONVERT +-# ifdef VTK_FFMPEG_HAS_OLD_HEADER +-# include +-# else +-# include +-# endif +-#endif ++extern "C" ++{ ++#include ++#include ++#include + } + +-#ifdef __GNUC__ +-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +-#endif +- +-#if LIBAVCODEC_VERSION_MAJOR < 55 +-# define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG +-# define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO +-# define AV_PIX_FMT_BGR24 PIX_FMT_BGR24 +-# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 +-# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P ++#if LIBAVFORMAT_VERSION_MAJOR < 59 ++#define vtk_ff_const59 ++#else ++#define vtk_ff_const59 const + #endif + +-#if LIBAVCODEC_VERSION_MAJOR < 56 || \ +- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 || \ +- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR == 28 && LIBAVCODEC_VERSION_MICRO < 1 +-# define av_frame_alloc avcodec_alloc_frame ++#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 ++extern "C" ++{ ++#include ++} + #endif + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + class vtkFFMPEGWriterInternal +- { ++{ + public: +- vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator); ++ vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator); + ~vtkFFMPEGWriterInternal(); + + int Start(); +- int Write(vtkImageData *id); ++ int Write(vtkImageData* id); + void End(); + + int Dim[2]; + int FrameRate; + + private: ++ vtkFFMPEGWriter* Writer; + +- vtkFFMPEGWriter *Writer; ++ AVFormatContext* avFormatContext; + +- AVFormatContext *avFormatContext; ++ vtk_ff_const59 AVOutputFormat* avOutputFormat; + +- AVOutputFormat *avOutputFormat; ++ AVStream* avStream; + +- AVStream *avStream; ++ AVFrame* rgbInput; ++ AVFrame* yuvOutput; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- unsigned char *codecBuf; +- int codecBufSize; +-#endif +- +- AVFrame *rgbInput; +- AVFrame *yuvOutput; ++ AVCodecContext* avCodecContext; + + int openedFile; + int closedFile; +- }; ++}; + +-//--------------------------------------------------------------------------- +-vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator) ++//------------------------------------------------------------------------------ ++vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator) + { + this->Writer = creator; + this->Dim[0] = 0; + this->Dim[1] = 0; + +- this->avFormatContext = NULL; ++ this->avFormatContext = nullptr; + +- this->avOutputFormat = NULL; ++ this->avOutputFormat = nullptr; + +- this->avStream = NULL; ++ this->avStream = nullptr; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- this->codecBuf = NULL; +-#endif +- this->rgbInput = NULL; +- this->yuvOutput = NULL; ++ this->rgbInput = nullptr; ++ this->yuvOutput = nullptr; + + this->openedFile = 0; + this->closedFile = 1; +@@ -115,7 +93,7 @@ + this->FrameRate = 25; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriterInternal::~vtkFFMPEGWriterInternal() + { + if (!this->closedFile) +@@ -124,41 +102,316 @@ + } + } + +-//--------------------------------------------------------------------------- ++// for newer versions of ffmpeg use the new API as the old has been deprecated ++#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 ++ ++//------------------------------------------------------------------------------ + int vtkFFMPEGWriterInternal::Start() + { + this->closedFile = 0; + +- //initialize libavcodec, and register all codecs and formats ++#ifdef NDEBUG ++ av_log_set_level(AV_LOG_ERROR); ++#endif ++ ++ // choose avi media file format ++ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); ++ if (!this->avOutputFormat) ++ { ++ vtkGenericWarningMacro(<< "Could not open the avi media file format."); ++ return 0; ++ } ++ ++ enum AVCodecID video_codec = this->Writer->GetCompression() ++ ? AV_CODEC_ID_MJPEG // choose a codec that is easily playable on windows ++ : AV_CODEC_ID_RAWVIDEO; ++ ++ // create the format context that wraps all of the media output structures ++ if (avformat_alloc_output_context2( ++ &this->avFormatContext, this->avOutputFormat, nullptr, this->Writer->GetFileName()) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open the format context."); ++ return 0; ++ } ++ ++ vtk_ff_const59 AVCodec* codec; ++ if (!(codec = avcodec_find_encoder(video_codec))) ++ { ++ vtkGenericWarningMacro(<< "Failed to get video codec."); ++ return 0; ++ } ++ ++ // create a stream for that file ++ this->avStream = avformat_new_stream(this->avFormatContext, codec); ++ if (!this->avStream) ++ { ++ vtkGenericWarningMacro(<< "Could not create video stream."); ++ return 0; ++ } ++ ++ // Set up the codec. ++ if (!(this->avCodecContext = avcodec_alloc_context3(codec))) ++ { ++ vtkGenericWarningMacro(<< "Failed to allocate codec context."); ++ return 0; ++ } ++ ++ this->avStream->codecpar->codec_id = video_codec; ++ this->avStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; ++ this->avStream->codecpar->width = this->Dim[0]; ++ this->avStream->codecpar->height = this->Dim[1]; ++ if (this->Writer->GetCompression()) ++ { ++ this->avStream->codecpar->format = AV_PIX_FMT_YUVJ420P; ++ } ++ else ++ { ++ this->avStream->codecpar->format = AV_PIX_FMT_BGR24; ++ } ++ this->avStream->time_base.den = this->FrameRate; ++ this->avStream->time_base.num = 1; ++ ++ if (!this->Writer->GetBitRate()) ++ { ++ // allow a variable quality/size tradeoff ++ switch (this->Writer->GetQuality()) ++ { ++ case 0: ++ this->avStream->codecpar->bit_rate = 3 * 1024 * 1024; ++ break; ++ case 1: ++ this->avStream->codecpar->bit_rate = 6 * 1024 * 1024; ++ break; ++ default: ++ this->avStream->codecpar->bit_rate = 12 * 1024 * 1024; ++ break; ++ } ++ } ++ else ++ { ++ this->avStream->codecpar->bit_rate = this->Writer->GetBitRate(); ++ } ++ ++ // to do playback at actual recorded rate, this will need more work see also below ++ avcodec_parameters_to_context(this->avCodecContext, this->avStream->codecpar); ++ this->avCodecContext->time_base.den = this->FrameRate; ++ this->avCodecContext->time_base.num = 1; ++ // this->avCodecContext->max_b_frames = 2; ++ // about one full frame per second ++ this->avCodecContext->gop_size = this->FrameRate; ++ if (this->avFormatContext->oformat->flags & AVFMT_GLOBALHEADER) ++ { ++ this->avCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; ++ } ++ if (!this->Writer->GetBitRateTolerance()) ++ { ++ this->avCodecContext->bit_rate_tolerance = ++ this->avCodecContext->bit_rate; // ffmpeg won't create a codec if brt
avCodecContext->bit_rate_tolerance = this->Writer->GetBitRateTolerance(); ++ } ++ avcodec_parameters_from_context(this->avStream->codecpar, this->avCodecContext); ++ ++ if (avcodec_open2(this->avCodecContext, codec, nullptr) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open codec."); ++ return 0; ++ } ++ ++ // for the output of the writer's input... ++ this->rgbInput = av_frame_alloc(); ++ if (!this->rgbInput) ++ { ++ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); ++ return 0; ++ } ++ this->rgbInput->format = AV_PIX_FMT_RGB24; ++ this->rgbInput->width = this->avCodecContext->width; ++ this->rgbInput->height = this->avCodecContext->height; ++ av_frame_get_buffer(this->rgbInput, 1); ++ ++ // and for the output to the codec's input. ++ this->yuvOutput = av_frame_alloc(); ++ if (!this->yuvOutput) ++ { ++ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); ++ return 0; ++ } ++ this->yuvOutput->format = this->avCodecContext->pix_fmt; ++ this->yuvOutput->width = this->avCodecContext->width; ++ this->yuvOutput->height = this->avCodecContext->height; ++ this->yuvOutput->pts = 0; ++ av_frame_get_buffer(this->yuvOutput, 1); ++ ++ // Finally, open the file and start it off. ++ if (!(this->avOutputFormat->flags & AVFMT_NOFILE)) ++ { ++ if (avio_open(&this->avFormatContext->pb, this->Writer->GetFileName(), AVIO_FLAG_WRITE) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); ++ return 0; ++ } ++ } ++ this->openedFile = 1; ++ ++ if (avformat_write_header(this->avFormatContext, nullptr) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); ++ return 0; ++ } ++ return 1; ++} ++ ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Write(vtkImageData* id) ++{ ++ this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); ++ ++ // copy the image from the input to the RGB buffer while flipping Y ++ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); ++ unsigned char* src; ++ for (int y = 0; y < this->avCodecContext->height; y++) ++ { ++ src = rgb + (this->avCodecContext->height - y - 1) * this->avCodecContext->width * 3; // flip Y ++ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; ++ memcpy((void*)dest, (void*)src, this->avCodecContext->width * 3); ++ } ++ ++ // convert that to YUV for input to the codec ++ SwsContext* convert_ctx = ++ sws_getContext(this->avCodecContext->width, this->avCodecContext->height, AV_PIX_FMT_RGB24, ++ this->avCodecContext->width, this->avCodecContext->height, this->avCodecContext->pix_fmt, ++ SWS_BICUBIC, nullptr, nullptr, nullptr); ++ ++ if (convert_ctx == nullptr) ++ { ++ vtkGenericWarningMacro(<< "swscale context initialization failed"); ++ return 0; ++ } ++ ++ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, ++ this->avCodecContext->height, this->yuvOutput->data, this->yuvOutput->linesize); ++ ++ sws_freeContext(convert_ctx); ++ ++ if (!result) ++ { ++ vtkGenericWarningMacro(<< "sws_scale() failed"); ++ return 0; ++ } ++ ++ int ret = avcodec_send_frame(this->avCodecContext, this->yuvOutput); ++ this->yuvOutput->pts++; ++ ++ if (ret < 0) ++ { ++ return 1; ++ } ++ ++ // run the encoder ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = nullptr; ++ pkt.size = 0; ++ ++ while (!ret) ++ { ++ // dump the compressed result to file ++ ret = avcodec_receive_packet(this->avCodecContext, &pkt); ++ if (!ret) ++ { ++ pkt.stream_index = this->avStream->index; ++ int wret = av_write_frame(this->avFormatContext, &pkt); ++ if (wret < 0) ++ { ++ vtkGenericWarningMacro(<< "Problem encoding frame."); ++ return 0; ++ } ++ } ++ } ++ ++ return 1; ++} ++ ++//------------------------------------------------------------------------------ ++void vtkFFMPEGWriterInternal::End() ++{ ++ if (this->yuvOutput) ++ { ++ av_frame_free(&this->yuvOutput); ++ this->yuvOutput = nullptr; ++ } ++ ++ if (this->rgbInput) ++ { ++ av_frame_free(&this->rgbInput); ++ this->rgbInput = nullptr; ++ } ++ ++ if (this->avFormatContext) ++ { ++ if (this->openedFile) ++ { ++ av_write_trailer(this->avFormatContext); ++ avio_close(this->avFormatContext->pb); ++ this->openedFile = 0; ++ } ++ ++ avformat_free_context(this->avFormatContext); ++ this->avFormatContext = nullptr; ++ } ++ ++ if (this->avOutputFormat) ++ { ++ // Next line was done inside av_free(this->avFormatContext). ++ // av_free(this->avOutputFormat); ++ ++ this->avOutputFormat = nullptr; ++ } ++ ++ if (this->avCodecContext) ++ { ++ avcodec_close(this->avCodecContext); ++ avcodec_free_context(&this->avCodecContext); ++ this->avCodecContext = nullptr; ++ } ++ ++ this->closedFile = 1; ++} ++ ++// for old versions of ffmpeg use the old API, eventually remove this code ++// The new API was introduced around 2016 ++#else ++ ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Start() ++{ ++ this->closedFile = 0; ++ ++ // initialize libavcodec, and register all codecs and formats + av_register_all(); + +- //create the format context that wraps all of the media output structures +-#if LIBAVFORMAT_VERSION_MAJOR >= 52 ++ // create the format context that wraps all of the media output structures + this->avFormatContext = avformat_alloc_context(); +-#else +- this->avFormatContext = av_alloc_format_context(); +-#endif + if (!this->avFormatContext) + { +- vtkGenericWarningMacro (<< "Coult not open the format context."); ++ vtkGenericWarningMacro(<< "Could not open the format context."); + return 0; + } + +- //choose avi media file format +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- this->avOutputFormat = guess_format("avi", NULL, NULL); +-#else +- this->avOutputFormat = av_guess_format("avi", NULL, NULL); +-#endif ++ // choose avi media file format ++ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); + if (!this->avOutputFormat) + { +- vtkGenericWarningMacro (<< "Could not open the avi media file format."); ++ vtkGenericWarningMacro(<< "Could not open the avi media file format."); + return 0; + } + + if (this->Writer->GetCompression()) + { +- //choose a codec that is easily playable on windows ++ // choose a codec that is easily playable on windows + this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; + } + else +@@ -166,36 +419,24 @@ + this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; + } + +- //assign the format to the context ++ // assign the format to the context + this->avFormatContext->oformat = this->avOutputFormat; + +- //choose a filename for the output ++ // choose a filename for the output + strcpy(this->avFormatContext->filename, this->Writer->GetFileName()); + +- //create a stream for that file +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- this->avStream = av_new_stream(this->avFormatContext, 0); +-#else ++ // create a stream for that file + this->avStream = avformat_new_stream(this->avFormatContext, 0); +-#endif + if (!this->avStream) + { +- vtkGenericWarningMacro (<< "Could not create video stream."); ++ vtkGenericWarningMacro(<< "Could not create video stream."); + return 0; + } + +- //Set up the codec. +- AVCodecContext *c = this->avStream->codec; +-#ifdef VTK_FFMPEG_AVCODECID ++ // Set up the codec. ++ AVCodecContext* c = this->avStream->codec; + c->codec_id = static_cast(this->avOutputFormat->video_codec); +-#else +- c->codec_id = static_cast(this->avOutputFormat->video_codec); +-#endif +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- c->codec_type = CODEC_TYPE_VIDEO; +-#else +- c->codec_type = AVMEDIA_TYPE_VIDEO; +-#endif ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + c->width = this->Dim[0]; + c->height = this->Dim[1]; + if (this->Writer->GetCompression()) +@@ -207,25 +448,25 @@ + c->pix_fmt = AV_PIX_FMT_BGR24; + } + +- //to do playback at actual recorded rate, this will need more work see also below ++ // to do playback at actual recorded rate, this will need more work see also below + c->time_base.den = this->FrameRate; + c->time_base.num = 1; +- //about one full frame per second ++ // about one full frame per second + c->gop_size = this->FrameRate; + +- if( !this->Writer->GetBitRate() ) ++ if (!this->Writer->GetBitRate()) + { +- //allow a variable quality/size tradeoff ++ // allow a variable quality/size tradeoff + switch (this->Writer->GetQuality()) + { + case 0: +- c->bit_rate = 3*1024*1024; ++ c->bit_rate = 3 * 1024 * 1024; + break; + case 1: +- c->bit_rate = 6*1024*1024; ++ c->bit_rate = 6 * 1024 * 1024; + break; + default: +- c->bit_rate = 12*1024*1024; ++ c->bit_rate = 12 * 1024 * 1024; + break; + } + } +@@ -234,262 +475,164 @@ + c->bit_rate = this->Writer->GetBitRate(); + } + +- if(!this->Writer->GetBitRateTolerance()) ++ if (!this->Writer->GetBitRateTolerance()) + { +- c->bit_rate_tolerance = c->bit_rate; //ffmpeg won't create a codec if brt
bit_rate_tolerance = c->bit_rate; // ffmpeg won't create a codec if brt
bit_rate_tolerance = this->Writer->GetBitRateTolerance(); + } + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- //apply the chosen parameters +- if (av_set_parameters(this->avFormatContext, NULL) < 0) +- { +- vtkGenericWarningMacro (<< "Invalid output format parameters." ); +- return 0; +- } +-#endif +- +- //manufacture a codec with the chosen parameters +- AVCodec *codec = avcodec_find_encoder(c->codec_id); ++ // manufacture a codec with the chosen parameters ++ AVCodec* codec = avcodec_find_encoder(c->codec_id); + if (!codec) + { +- vtkGenericWarningMacro (<< "Codec not found." ); +- return 0; +- } +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (avcodec_open(c, codec) < 0) +-#else +- if (avcodec_open2(c, codec, NULL) < 0) +-#endif +- { +- vtkGenericWarningMacro (<< "Could not open codec."); ++ vtkGenericWarningMacro(<< "Codec not found."); + return 0; + } +- +- //create buffers for the codec to work with. +- +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- //working compression space +- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough +- this->codecBuf = new unsigned char[this->codecBufSize]; +- if (!this->codecBuf) ++ if (avcodec_open2(c, codec, nullptr) < 0) + { +- vtkGenericWarningMacro (<< "Could not make codec working space." ); ++ vtkGenericWarningMacro(<< "Could not open codec."); + return 0; + } +-#endif + +- //for the output of the writer's input... ++ // for the output of the writer's input... + this->rgbInput = av_frame_alloc(); + if (!this->rgbInput) + { +- vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); ++ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); + return 0; + } + int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); +- unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); ++ unsigned char* rgb = (unsigned char*)av_malloc(sizeof(unsigned char) * RGBsize); + if (!rgb) + { +- vtkGenericWarningMacro (<< "Could not make rgbInput's buffer." ); ++ vtkGenericWarningMacro(<< "Could not make rgbInput's buffer."); + return 0; + } +- //The rgb buffer should get deleted when this->rgbInput is. +- avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); ++ // The rgb buffer should get deleted when this->rgbInput is. ++ avpicture_fill((AVPicture*)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); + +- //and for the output to the codec's input. ++ // and for the output to the codec's input. + this->yuvOutput = av_frame_alloc(); + if (!this->yuvOutput) + { +- vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); ++ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); + return 0; + } + int YUVsize = avpicture_get_size(c->pix_fmt, c->width, c->height); +- unsigned char *yuv = (unsigned char *)av_malloc(sizeof(unsigned char) * YUVsize); ++ unsigned char* yuv = (unsigned char*)av_malloc(sizeof(unsigned char) * YUVsize); + if (!yuv) + { +- vtkGenericWarningMacro (<< "Could not make yuvOutput's buffer." ); ++ vtkGenericWarningMacro(<< "Could not make yuvOutput's buffer."); + return 0; + } +- //The yuv buffer should get deleted when this->yuv_input is. +- avpicture_fill((AVPicture *)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); +- ++ // The yuv buffer should get deleted when this->yuv_input is. ++ avpicture_fill((AVPicture*)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); + +- //Finally, open the file and start it off. +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0) +-#else ++ // Finally, open the file and start it off. + if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0) +-#endif + { +- vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." ); ++ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); + return 0; + } + this->openedFile = 1; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- av_write_header(this->avFormatContext); +-#else +- if (avformat_write_header(this->avFormatContext, NULL) < 0) ++ if (avformat_write_header(this->avFormatContext, nullptr) < 0) + { +- vtkGenericWarningMacro (<< "Could not allocate avcodec private data."); ++ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); + return 0; + } +-#endif + return 1; + } + +-//--------------------------------------------------------------------------- +-int vtkFFMPEGWriterInternal::Write(vtkImageData *id) ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Write(vtkImageData* id) + { + this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); + +- AVCodecContext *cc = this->avStream->codec; ++ AVCodecContext* cc = this->avStream->codec; + +- //copy the image from the input to the RGB buffer while flipping Y +- unsigned char *rgb = (unsigned char*)id->GetScalarPointer(); +- unsigned char *src; ++ // copy the image from the input to the RGB buffer while flipping Y ++ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); ++ unsigned char* src; + for (int y = 0; y < cc->height; y++) + { +- src = rgb + (cc->height-y-1) * cc->width * 3; //flip Y +- unsigned char *dest = +- &this->rgbInput->data[0][y*this->rgbInput->linesize[0]]; +- memcpy((void*)dest, (void*)src, cc->width*3); ++ src = rgb + (cc->height - y - 1) * cc->width * 3; // flip Y ++ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; ++ memcpy((void*)dest, (void*)src, cc->width * 3); + } + +- //convert that to YUV for input to the codec +-#ifdef VTK_FFMPEG_HAS_IMG_CONVERT +- img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, +- (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, +- cc->width, cc->height); +-#else +- //convert that to YUV for input to the codec +- SwsContext* convert_ctx = sws_getContext( +- cc->width, cc->height, AV_PIX_FMT_RGB24, +- cc->width, cc->height, cc->pix_fmt, +- SWS_BICUBIC, NULL, NULL, NULL); ++ // convert that to YUV for input to the codec ++ SwsContext* convert_ctx = sws_getContext(cc->width, cc->height, AV_PIX_FMT_RGB24, cc->width, ++ cc->height, cc->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr); + +- if(convert_ctx == NULL) ++ if (convert_ctx == nullptr) + { + vtkGenericWarningMacro(<< "swscale context initialization failed"); + return 0; + } + +- int result = sws_scale(convert_ctx, +- this->rgbInput->data, this->rgbInput->linesize, +- 0, cc->height, +- this->yuvOutput->data, this->yuvOutput->linesize +- ); ++ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, cc->height, ++ this->yuvOutput->data, this->yuvOutput->linesize); + + sws_freeContext(convert_ctx); + +- if(!result) ++ if (!result) + { + vtkGenericWarningMacro(<< "sws_scale() failed"); + return 0; + } +-#endif + +- //run the encoder ++ // run the encoder + AVPacket pkt; + av_init_packet(&pkt); +- pkt.data = NULL; ++ pkt.data = nullptr; + pkt.size = 0; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- int toAdd = avcodec_encode_video(cc, +- this->codecBuf, +- this->codecBufSize, +- this->yuvOutput); +- if (toAdd) +- { +- //to do playback at actual recorded rate, this will need more work +- pkt.pts = cc->coded_frame->pts; +- //pkt.dts = ?; not dure what decompression time stamp should be +- pkt.data = this->codecBuf; +- pkt.size = toAdd; +- pkt.stream_index = this->avStream->index; +- if (cc->coded_frame->key_frame) //treat keyframes well +- { +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- pkt.flags |= PKT_FLAG_KEY; +-#else +- pkt.flags |= AV_PKT_FLAG_KEY; +-#endif +- } +- pkt.duration = 0; //presentation duration in time_base units or 0 if NA +- pkt.pos = -1; //byte position in stream or -1 if NA +- +- toAdd = av_write_frame(this->avFormatContext, &pkt); +- } +- if (toAdd) //should not have anything left over +- { +- vtkGenericWarningMacro (<< "Problem encoding frame." ); +- return 0; +- } +- +-#else + int got_frame; +- int ret = avcodec_encode_video2(cc, +- &pkt, +- this->yuvOutput, +- &got_frame); ++ int ret = avcodec_encode_video2(cc, &pkt, this->yuvOutput, &got_frame); + +- //dump the compressed result to file ++ // dump the compressed result to file + if (got_frame) + { + pkt.stream_index = this->avStream->index; + ret = av_write_frame(this->avFormatContext, &pkt); + } + +- if (ret<0) ++ if (ret < 0) + { +- vtkGenericWarningMacro (<< "Problem encoding frame." ); ++ vtkGenericWarningMacro(<< "Problem encoding frame."); + return 0; + } +-#endif + + return 1; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriterInternal::End() + { + if (this->yuvOutput) + { + av_free(this->yuvOutput->data[0]); + av_free(this->yuvOutput); +- this->yuvOutput = NULL; ++ this->yuvOutput = nullptr; + } + + if (this->rgbInput) + { + av_free(this->rgbInput->data[0]); + av_free(this->rgbInput); +- this->rgbInput = NULL; ++ this->rgbInput = nullptr; + } + +- +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (this->codecBuf) +- { +- av_free(this->codecBuf); +- this->codecBuf = NULL; +- } +-#endif +- + if (this->avFormatContext) + { + if (this->openedFile) + { + av_write_trailer(this->avFormatContext); +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- url_fclose(this->avFormatContext->pb); +-#else + avio_close(this->avFormatContext->pb); +-#endif + this->openedFile = 0; + } + +@@ -500,13 +643,13 @@ + if (this->avStream) + { + av_free(this->avStream); +- this->avStream = NULL; ++ this->avStream = nullptr; + } + + if (this->avOutputFormat) + { +- //Next line was done inside av_free(this->avFormatContext). +- //av_free(this->avOutputFormat); ++ // Next line was done inside av_free(this->avFormatContext). ++ // av_free(this->avOutputFormat); + + this->avOutputFormat = 0; + } +@@ -514,14 +657,15 @@ + this->closedFile = 1; + } + ++#endif + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkStandardNewMacro(vtkFFMPEGWriter); + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriter::vtkFFMPEGWriter() + { +- this->Internals = 0; ++ this->Internals = nullptr; + this->Quality = 2; + this->Compression = true; + this->Rate = 25; +@@ -529,24 +673,24 @@ + this->BitRateTolerance = 0; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriter::~vtkFFMPEGWriter() + { + delete this->Internals; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::Start() + { + this->Error = 1; + +- if ( this->Internals ) ++ if (this->Internals) + { + vtkErrorMacro("Movie already started."); + this->SetErrorCode(vtkGenericMovieWriter::InitError); + return; + } +- if ( this->GetInput() == NULL ) ++ if (this->GetInput() == nullptr) + { + vtkErrorMacro("Please specify an input."); + this->SetErrorCode(vtkGenericMovieWriter::NoInputError); +@@ -566,7 +710,7 @@ + this->Initialized = 0; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::Write() + { + if (this->Error) +@@ -574,7 +718,7 @@ + return; + } + +- if ( !this->Internals ) ++ if (!this->Internals) + { + vtkErrorMacro("Movie not started."); + this->Error = 1; +@@ -588,13 +732,13 @@ + + int dim[4]; + input->GetDimensions(dim); +- if ( this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0 ) ++ if (this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0) + { + this->Internals->Dim[0] = dim[0]; + this->Internals->Dim[1] = dim[1]; + } + +- if (this->Internals->Dim[0]!= dim[0] || this->Internals->Dim[1]!= dim[1]) ++ if (this->Internals->Dim[0] != dim[0] || this->Internals->Dim[1] != dim[1]) + { + vtkErrorMacro("Image not of the same size."); + this->Error = 1; +@@ -602,7 +746,7 @@ + return; + } + +- if ( !this->Initialized ) ++ if (!this->Initialized) + { + this->Internals->FrameRate = this->Rate; + if (!this->Internals->Start()) +@@ -623,21 +767,21 @@ + } + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::End() + { + this->Internals->End(); + + delete this->Internals; +- this->Internals = 0; ++ this->Internals = nullptr; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::PrintSelf(ostream& os, vtkIndent indent) + { + this->Superclass::PrintSelf(os, indent); + os << indent << "Quality: " << this->Quality << endl; +- os << indent << "Compression: " << (this->Compression?"true":"false") << endl; ++ os << indent << "Compression: " << (this->Compression ? "true" : "false") << endl; + os << indent << "Rate: " << this->Rate << endl; + os << indent << "BitRate: " << this->BitRate << endl; + os << indent << "BitRateTolerance: " << this->BitRateTolerance << endl; From bb2c66352cc6c22b7d79d90b2f59a91d2b48b253 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 18:02:16 +0000 Subject: [PATCH 15/53] #42 update conda build chaste refs --- infra/conda/chaste/py310/.scripts/build_steps.sh | 8 ++++---- infra/conda/chaste/py310/.scripts/run_docker_build.sh | 4 ++-- infra/conda/chaste/py310/build.sh | 4 ++-- infra/conda/chaste/py311/.scripts/build_steps.sh | 8 ++++---- infra/conda/chaste/py311/.scripts/run_docker_build.sh | 4 ++-- infra/conda/chaste/py311/build.sh | 4 ++-- infra/conda/chaste/py312/.scripts/build_steps.sh | 8 ++++---- infra/conda/chaste/py312/.scripts/run_docker_build.sh | 4 ++-- infra/conda/chaste/py312/build.sh | 4 ++-- infra/conda/chaste/py38/.scripts/build_steps.sh | 8 ++++---- infra/conda/chaste/py38/.scripts/run_docker_build.sh | 4 ++-- infra/conda/chaste/py38/build.sh | 4 ++-- infra/conda/chaste/py39/.scripts/build_steps.sh | 8 ++++---- infra/conda/chaste/py39/.scripts/run_docker_build.sh | 4 ++-- infra/conda/chaste/py39/build.sh | 4 ++-- 15 files changed, 40 insertions(+), 40 deletions(-) diff --git a/infra/conda/chaste/py310/.scripts/build_steps.sh b/infra/conda/chaste/py310/.scripts/build_steps.sh index 3da46528..4dca84f9 100755 --- a/infra/conda/chaste/py310/.scripts/build_steps.sh +++ b/infra/conda/chaste/py310/.scripts/build_steps.sh @@ -52,11 +52,11 @@ conda list --show-channel-urls /usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch -CHASTE_GIT_BRANCH="${CHASTE_BRANCH:-develop}" -PYCHASTE_GIT_BRANCH="${PYCHASTE_BRANCH:-develop}" +CHASTE_GIT_REF="${CHASTE_BRANCH:-develop}" +PYCHASTE_GIT_REF="${PYCHASTE_BRANCH:-develop}" -git clone --recursive --branch ${CHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste -git clone --recursive --branch ${PYCHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste +git clone --recursive --branch ${CHASTE_GIT_REF} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste +git clone --recursive --branch ${PYCHASTE_GIT_REF} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste mkdir -p /tmp/patches cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ diff --git a/infra/conda/chaste/py310/.scripts/run_docker_build.sh b/infra/conda/chaste/py310/.scripts/run_docker_build.sh index 39028d19..3724c773 100755 --- a/infra/conda/chaste/py310/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/py310/.scripts/run_docker_build.sh @@ -27,8 +27,8 @@ docker run --rm -it \ -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ -e CPU_COUNT="${CPU_COUNT}" \ -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ - -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ + -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" diff --git a/infra/conda/chaste/py310/build.sh b/infra/conda/chaste/py310/build.sh index ba2fc21d..b438c6c0 100755 --- a/infra/conda/chaste/py310/build.sh +++ b/infra/conda/chaste/py310/build.sh @@ -3,8 +3,8 @@ set -xeo pipefail export CONFIG='linux_64_python3.10.____cpython' -export CHASTE_GIT_BRANCH='develop' -export PYCHASTE_GIT_BRANCH='develop' +export CHASTE_GIT_REF='2024.1' +export PYCHASTE_GIT_REF='2024.1' export BUILD_WITH_CONDA_DEBUG='0' export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' export CPU_COUNT=2 diff --git a/infra/conda/chaste/py311/.scripts/build_steps.sh b/infra/conda/chaste/py311/.scripts/build_steps.sh index 3da46528..4dca84f9 100755 --- a/infra/conda/chaste/py311/.scripts/build_steps.sh +++ b/infra/conda/chaste/py311/.scripts/build_steps.sh @@ -52,11 +52,11 @@ conda list --show-channel-urls /usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch -CHASTE_GIT_BRANCH="${CHASTE_BRANCH:-develop}" -PYCHASTE_GIT_BRANCH="${PYCHASTE_BRANCH:-develop}" +CHASTE_GIT_REF="${CHASTE_BRANCH:-develop}" +PYCHASTE_GIT_REF="${PYCHASTE_BRANCH:-develop}" -git clone --recursive --branch ${CHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste -git clone --recursive --branch ${PYCHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste +git clone --recursive --branch ${CHASTE_GIT_REF} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste +git clone --recursive --branch ${PYCHASTE_GIT_REF} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste mkdir -p /tmp/patches cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ diff --git a/infra/conda/chaste/py311/.scripts/run_docker_build.sh b/infra/conda/chaste/py311/.scripts/run_docker_build.sh index 39028d19..3724c773 100755 --- a/infra/conda/chaste/py311/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/py311/.scripts/run_docker_build.sh @@ -27,8 +27,8 @@ docker run --rm -it \ -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ -e CPU_COUNT="${CPU_COUNT}" \ -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ - -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ + -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" diff --git a/infra/conda/chaste/py311/build.sh b/infra/conda/chaste/py311/build.sh index ffdd978e..8750ec0a 100755 --- a/infra/conda/chaste/py311/build.sh +++ b/infra/conda/chaste/py311/build.sh @@ -3,8 +3,8 @@ set -xeo pipefail export CONFIG='linux_64_python3.11.____cpython' -export CHASTE_GIT_BRANCH='develop' -export PYCHASTE_GIT_BRANCH='develop' +export CHASTE_GIT_REF='2024.1' +export PYCHASTE_GIT_REF='2024.1' export BUILD_WITH_CONDA_DEBUG='0' export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' export CPU_COUNT=2 diff --git a/infra/conda/chaste/py312/.scripts/build_steps.sh b/infra/conda/chaste/py312/.scripts/build_steps.sh index 3da46528..4dca84f9 100755 --- a/infra/conda/chaste/py312/.scripts/build_steps.sh +++ b/infra/conda/chaste/py312/.scripts/build_steps.sh @@ -52,11 +52,11 @@ conda list --show-channel-urls /usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch -CHASTE_GIT_BRANCH="${CHASTE_BRANCH:-develop}" -PYCHASTE_GIT_BRANCH="${PYCHASTE_BRANCH:-develop}" +CHASTE_GIT_REF="${CHASTE_BRANCH:-develop}" +PYCHASTE_GIT_REF="${PYCHASTE_BRANCH:-develop}" -git clone --recursive --branch ${CHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste -git clone --recursive --branch ${PYCHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste +git clone --recursive --branch ${CHASTE_GIT_REF} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste +git clone --recursive --branch ${PYCHASTE_GIT_REF} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste mkdir -p /tmp/patches cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ diff --git a/infra/conda/chaste/py312/.scripts/run_docker_build.sh b/infra/conda/chaste/py312/.scripts/run_docker_build.sh index 39028d19..3724c773 100755 --- a/infra/conda/chaste/py312/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/py312/.scripts/run_docker_build.sh @@ -27,8 +27,8 @@ docker run --rm -it \ -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ -e CPU_COUNT="${CPU_COUNT}" \ -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ - -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ + -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" diff --git a/infra/conda/chaste/py312/build.sh b/infra/conda/chaste/py312/build.sh index 4c29287b..ffbfcd32 100755 --- a/infra/conda/chaste/py312/build.sh +++ b/infra/conda/chaste/py312/build.sh @@ -3,8 +3,8 @@ set -xeo pipefail export CONFIG='linux_64_python3.12.____cpython' -export CHASTE_GIT_BRANCH='develop' -export PYCHASTE_GIT_BRANCH='develop' +export CHASTE_GIT_REF='2024.1' +export PYCHASTE_GIT_REF='2024.1' export BUILD_WITH_CONDA_DEBUG='0' export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' export CPU_COUNT=2 diff --git a/infra/conda/chaste/py38/.scripts/build_steps.sh b/infra/conda/chaste/py38/.scripts/build_steps.sh index 3da46528..4dca84f9 100755 --- a/infra/conda/chaste/py38/.scripts/build_steps.sh +++ b/infra/conda/chaste/py38/.scripts/build_steps.sh @@ -52,11 +52,11 @@ conda list --show-channel-urls /usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch -CHASTE_GIT_BRANCH="${CHASTE_BRANCH:-develop}" -PYCHASTE_GIT_BRANCH="${PYCHASTE_BRANCH:-develop}" +CHASTE_GIT_REF="${CHASTE_BRANCH:-develop}" +PYCHASTE_GIT_REF="${PYCHASTE_BRANCH:-develop}" -git clone --recursive --branch ${CHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste -git clone --recursive --branch ${PYCHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste +git clone --recursive --branch ${CHASTE_GIT_REF} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste +git clone --recursive --branch ${PYCHASTE_GIT_REF} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste mkdir -p /tmp/patches cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ diff --git a/infra/conda/chaste/py38/.scripts/run_docker_build.sh b/infra/conda/chaste/py38/.scripts/run_docker_build.sh index 39028d19..3724c773 100755 --- a/infra/conda/chaste/py38/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/py38/.scripts/run_docker_build.sh @@ -27,8 +27,8 @@ docker run --rm -it \ -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ -e CPU_COUNT="${CPU_COUNT}" \ -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ - -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ + -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" diff --git a/infra/conda/chaste/py38/build.sh b/infra/conda/chaste/py38/build.sh index b5ce1e77..73806298 100755 --- a/infra/conda/chaste/py38/build.sh +++ b/infra/conda/chaste/py38/build.sh @@ -3,8 +3,8 @@ set -xeo pipefail export CONFIG='linux_64_python3.8.____cpython' -export CHASTE_GIT_BRANCH='develop' -export PYCHASTE_GIT_BRANCH='develop' +export CHASTE_GIT_REF='2024.1' +export PYCHASTE_GIT_REF='2024.1' export BUILD_WITH_CONDA_DEBUG='0' export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' export CPU_COUNT=2 diff --git a/infra/conda/chaste/py39/.scripts/build_steps.sh b/infra/conda/chaste/py39/.scripts/build_steps.sh index 3da46528..4dca84f9 100755 --- a/infra/conda/chaste/py39/.scripts/build_steps.sh +++ b/infra/conda/chaste/py39/.scripts/build_steps.sh @@ -52,11 +52,11 @@ conda list --show-channel-urls /usr/bin/sudo -n yum install -y libXt-devel mesa-libGLU-devel patch -CHASTE_GIT_BRANCH="${CHASTE_BRANCH:-develop}" -PYCHASTE_GIT_BRANCH="${PYCHASTE_BRANCH:-develop}" +CHASTE_GIT_REF="${CHASTE_BRANCH:-develop}" +PYCHASTE_GIT_REF="${PYCHASTE_BRANCH:-develop}" -git clone --recursive --branch ${CHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste -git clone --recursive --branch ${PYCHASTE_GIT_BRANCH} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste +git clone --recursive --branch ${CHASTE_GIT_REF} --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste +git clone --recursive --branch ${PYCHASTE_GIT_REF} --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste mkdir -p /tmp/patches cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ diff --git a/infra/conda/chaste/py39/.scripts/run_docker_build.sh b/infra/conda/chaste/py39/.scripts/run_docker_build.sh index 39028d19..3724c773 100755 --- a/infra/conda/chaste/py39/.scripts/run_docker_build.sh +++ b/infra/conda/chaste/py39/.scripts/run_docker_build.sh @@ -27,8 +27,8 @@ docker run --rm -it \ -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ -e CPU_COUNT="${CPU_COUNT}" \ -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_BRANCH="${CHASTE_GIT_BRANCH}" \ - -e PYCHASTE_GIT_BRANCH="${PYCHASTE_GIT_BRANCH}" \ + -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ + -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ "${DOCKER_IMAGE}" \ bash "/home/conda/feedstock_root/.scripts/build_steps.sh" diff --git a/infra/conda/chaste/py39/build.sh b/infra/conda/chaste/py39/build.sh index e6615a6d..f97938ad 100755 --- a/infra/conda/chaste/py39/build.sh +++ b/infra/conda/chaste/py39/build.sh @@ -3,8 +3,8 @@ set -xeo pipefail export CONFIG='linux_64_python3.9.____cpython' -export CHASTE_GIT_BRANCH='develop' -export PYCHASTE_GIT_BRANCH='develop' +export CHASTE_GIT_REF='2024.1' +export PYCHASTE_GIT_REF='2024.1' export BUILD_WITH_CONDA_DEBUG='0' export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' export CPU_COUNT=2 From 7e8b55b5e217c8dd9f6999556409ef83f4e51e8b Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 18:03:25 +0000 Subject: [PATCH 16/53] #29 update xsd build scripts --- infra/conda/xsd/build-package.sh | 95 +++++++++++++++++++ infra/conda/xsd/build.sh | 3 - infra/conda/xsd/meta.yaml | 15 --- infra/conda/xsd/recipe/build.sh | 4 + infra/conda/xsd/recipe/meta.yaml | 22 +++++ .../linux_64_python3.8.____cpython.yaml | 35 +++++++ 6 files changed, 156 insertions(+), 18 deletions(-) create mode 100755 infra/conda/xsd/build-package.sh delete mode 100755 infra/conda/xsd/build.sh delete mode 100644 infra/conda/xsd/meta.yaml create mode 100755 infra/conda/xsd/recipe/build.sh create mode 100644 infra/conda/xsd/recipe/meta.yaml create mode 100755 infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml diff --git a/infra/conda/xsd/build-package.sh b/infra/conda/xsd/build-package.sh new file mode 100755 index 00000000..fe0f9c1e --- /dev/null +++ b/infra/conda/xsd/build-package.sh @@ -0,0 +1,95 @@ +#!/bin/bash +set -xeo pipefail + + +'linux_64_python3.10.____cpython' +export UPLOAD_PACKAGES='False' +export BUILD_WITH_CONDA_DEBUG='0' +export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' +export CPU_COUNT=4 + +usage() { + echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' + echo 'Example:' + echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' + echo "$(basename "$0")"' --variant=linux_64_python3.10.____cpython --parallel=4' + exit 1 +} + +# Parse args +variant= +parallel= + +for option; do + case $option in + --variant=*) + variant=$(expr "x$option" : "x--version=\(.*\)") + ;; + --parallel=*) + parallel=$(expr "x$option" : "x--parallel=\(.*\)") + ;; + *) + echo "Unknown option: $option" 1>&2 + exit 1 + ;; + esac +done + +if [ -z "${variant}" ]; then usage; fi + +# Configure environment +export FEEDSTOCK_ROOT="$(pwd)" +export RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" +export CONFIG_FILE="${FEEDSTOCK_ROOT}/variants/${variant}.yaml" +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +export CPU_COUNT="${parallel:-$(nproc)}" + +export PYTHONUNBUFFERED=1 + +# Configure conda build path +mkdir -p "${CONDA_BLD_PATH}" + +cat >~/.condarc <"${CONDA_PREFIX}"/etc/conda/activate.d/conda-forge-ci-setup-activate.sh < Date: Tue, 16 Apr 2024 18:07:45 +0000 Subject: [PATCH 17/53] #29 update xsd conda script --- infra/conda/xsd/build-package.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/infra/conda/xsd/build-package.sh b/infra/conda/xsd/build-package.sh index fe0f9c1e..98ebd8e9 100755 --- a/infra/conda/xsd/build-package.sh +++ b/infra/conda/xsd/build-package.sh @@ -1,13 +1,7 @@ #!/bin/bash set -xeo pipefail - -'linux_64_python3.10.____cpython' -export UPLOAD_PACKAGES='False' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=4 - +# Show usage usage() { echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' echo 'Example:' From 3499f12451c706e9042f9481be355676c060e50c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 18:51:47 +0000 Subject: [PATCH 18/53] #29 update xsd conda script --- infra/conda/xsd/build-package.sh | 4 ++-- infra/conda/xsd/recipe/meta.yaml | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/infra/conda/xsd/build-package.sh b/infra/conda/xsd/build-package.sh index 98ebd8e9..76dc951e 100755 --- a/infra/conda/xsd/build-package.sh +++ b/infra/conda/xsd/build-package.sh @@ -6,7 +6,7 @@ usage() { echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' echo 'Example:' echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' - echo "$(basename "$0")"' --variant=linux_64_python3.10.____cpython --parallel=4' + echo "$(basename "$0")"' --variant=linux_64_python3.8.____cpython --parallel=4' exit 1 } @@ -17,7 +17,7 @@ parallel= for option; do case $option in --variant=*) - variant=$(expr "x$option" : "x--version=\(.*\)") + variant=$(expr "x$option" : "x--variant=\(.*\)") ;; --parallel=*) parallel=$(expr "x$option" : "x--parallel=\(.*\)") diff --git a/infra/conda/xsd/recipe/meta.yaml b/infra/conda/xsd/recipe/meta.yaml index 68fd18cc..d02be8d5 100644 --- a/infra/conda/xsd/recipe/meta.yaml +++ b/infra/conda/xsd/recipe/meta.yaml @@ -17,6 +17,16 @@ build: number: {{ build }} string: {{ build_string }} +requirements: + host: + - xerces-c + run: + - xerces-c + +test: + commands: + - xsd --version + about: home: http://www.codesynthesis.com/products/xsd/ license: GPL 2.0 with FLOSS Exception From 18e0792c660458aa9bda447b542c0f03e4e67d48 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 20:03:08 +0000 Subject: [PATCH 19/53] #29 build xsd from source --- infra/conda/.gitignore | 2 ++ infra/conda/xsd/recipe/build.sh | 18 ++++++++++++++++-- infra/conda/xsd/recipe/meta.yaml | 10 +++++++--- .../linux_64_python3.8.____cpython.yaml | 10 +++++----- 4 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 infra/conda/.gitignore diff --git a/infra/conda/.gitignore b/infra/conda/.gitignore new file mode 100644 index 00000000..4d069c06 --- /dev/null +++ b/infra/conda/.gitignore @@ -0,0 +1,2 @@ +*.pyc +build_artifacts diff --git a/infra/conda/xsd/recipe/build.sh b/infra/conda/xsd/recipe/build.sh index 4e50d924..043278a3 100755 --- a/infra/conda/xsd/recipe/build.sh +++ b/infra/conda/xsd/recipe/build.sh @@ -1,4 +1,18 @@ #!/bin/bash -cp "$SRC_DIR/bin/xsd" "$PREFIX/bin/xsd" -cp -r "$SRC_DIR/libxsd/" "$PREFIX/include/" +make \ + CC="$CC" \ + CXX="$CXX" \ + AR="$AR" \ + RANLIB="$RANLIB" \ + CFLAGS="$CFLAGS" \ + CPPFLAGS="$CPPFLAGS" \ + CXXFLAGS="$CXXFLAGS \ + -std=c++14" \ + LDFLAGS="$LDFLAGS" \ + -j $CPU_COUNT \ + verbose=1 + +make test + +make install_prefix="$PREFIX" install diff --git a/infra/conda/xsd/recipe/meta.yaml b/infra/conda/xsd/recipe/meta.yaml index d02be8d5..61e93d04 100644 --- a/infra/conda/xsd/recipe/meta.yaml +++ b/infra/conda/xsd/recipe/meta.yaml @@ -9,15 +9,19 @@ package: version: {{ version }} source: - fn: xsd-{{ version }}-x86_64-linux-gnu.tar.bz2 - url: http://www.codesynthesis.com/download/xsd/{{ minor_version }}/linux-gnu/x86_64/xsd-{{ version }}-x86_64-linux-gnu.tar.bz2 - sha256: d01060cbf4b3a1e462a5c5ad1a5a6773b541766dbbb98e50c9efb8f2a2dd55b7 + fn: xsd-{{ version }}.tar.bz2 + url: http://www.codesynthesis.com/download/xsd/{{ minor_version }}/xsd-{{ version }}+dep.tar.bz2 + sha256: eca52a9c8f52cdbe2ae4e364e4a909503493a0d51ea388fc6c9734565a859817 build: number: {{ build }} string: {{ build_string }} requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - make host: - xerces-c run: diff --git a/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml b/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml index cac08662..3616ae9f 100755 --- a/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml +++ b/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: - - "11" + - "9" cdt_name: - cos7 channel_sources: @@ -12,13 +12,13 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: - - "11" + - "9" docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: - gfortran fortran_compiler_version: - - "11" + - "9" pin_run_as_build: python: min_pin: x.x @@ -27,8 +27,8 @@ python: - 3.8.* *_cpython target_platform: - linux-64 -xsd: - - 4.0.0 +xercesc: + - ">=3" zip_keys: - - c_compiler_version - cxx_compiler_version From 028a39c7903df3a75b56daa894eb871a74f68b18 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 20:34:25 +0000 Subject: [PATCH 20/53] #29 add xsd macos variants --- infra/conda/xsd/{ => 4.0}/build-package.sh | 2 +- infra/conda/xsd/{ => 4.0}/recipe/build.sh | 0 infra/conda/xsd/{ => 4.0}/recipe/meta.yaml | 0 .../variants/linux_64.yaml} | 10 +++--- infra/conda/xsd/4.0/variants/osx_64.yaml | 35 +++++++++++++++++++ infra/conda/xsd/4.0/variants/osx_arm64.yaml | 35 +++++++++++++++++++ 6 files changed, 75 insertions(+), 7 deletions(-) rename infra/conda/xsd/{ => 4.0}/build-package.sh (96%) rename infra/conda/xsd/{ => 4.0}/recipe/build.sh (100%) rename infra/conda/xsd/{ => 4.0}/recipe/meta.yaml (100%) rename infra/conda/xsd/{variants/linux_64_python3.8.____cpython.yaml => 4.0/variants/linux_64.yaml} (85%) create mode 100755 infra/conda/xsd/4.0/variants/osx_64.yaml create mode 100755 infra/conda/xsd/4.0/variants/osx_arm64.yaml diff --git a/infra/conda/xsd/build-package.sh b/infra/conda/xsd/4.0/build-package.sh similarity index 96% rename from infra/conda/xsd/build-package.sh rename to infra/conda/xsd/4.0/build-package.sh index 76dc951e..cd66a219 100755 --- a/infra/conda/xsd/build-package.sh +++ b/infra/conda/xsd/4.0/build-package.sh @@ -6,7 +6,7 @@ usage() { echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' echo 'Example:' echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' - echo "$(basename "$0")"' --variant=linux_64_python3.8.____cpython --parallel=4' + echo "$(basename "$0")"' --variant=linux_64 --parallel=4' exit 1 } diff --git a/infra/conda/xsd/recipe/build.sh b/infra/conda/xsd/4.0/recipe/build.sh similarity index 100% rename from infra/conda/xsd/recipe/build.sh rename to infra/conda/xsd/4.0/recipe/build.sh diff --git a/infra/conda/xsd/recipe/meta.yaml b/infra/conda/xsd/4.0/recipe/meta.yaml similarity index 100% rename from infra/conda/xsd/recipe/meta.yaml rename to infra/conda/xsd/4.0/recipe/meta.yaml diff --git a/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml similarity index 85% rename from infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml rename to infra/conda/xsd/4.0/variants/linux_64.yaml index 3616ae9f..64d9c790 100755 --- a/infra/conda/xsd/variants/linux_64_python3.8.____cpython.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -20,15 +20,13 @@ fortran_compiler: fortran_compiler_version: - "9" pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: - - 3.8.* *_cpython + xercesc: + min_pin: x + max_pin: x target_platform: - linux-64 xercesc: - - ">=3" + - "3.0.0" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml new file mode 100755 index 00000000..117fcfeb --- /dev/null +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -0,0 +1,35 @@ +MACOSX_DEPLOYMENT_TARGET: + - "10.9" +c_compiler: + - clang +c_compiler_version: + - "16" +cdt_name: + - cos7 +channel_sources: + - pychaste + - conda-forge +channel_targets: + - pychaste main +cxx_compiler: + - gxx +cxx_compiler_version: + - "9" +fortran_compiler: + - gfortran +fortran_compiler_version: + - "9" +macos_machine: + - x86_64-apple-darwin13.4.0 +pin_run_as_build: + xercesc: + min_pin: x + max_pin: x +target_platform: + - osx-64 +xercesc: + - "3.0.0" +zip_keys: + - - c_compiler_version + - cxx_compiler_version + - fortran_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml new file mode 100755 index 00000000..1b27ef95 --- /dev/null +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -0,0 +1,35 @@ +MACOSX_DEPLOYMENT_TARGET: + - "11.0" +c_compiler: + - clang +c_compiler_version: + - "16" +cdt_name: + - cos7 +channel_sources: + - pychaste + - conda-forge +channel_targets: + - pychaste main +cxx_compiler: + - gxx +cxx_compiler_version: + - "9" +fortran_compiler: + - gfortran +fortran_compiler_version: + - "9" +macos_machine: + - arm64-apple-darwin20.0.0 +pin_run_as_build: + xercesc: + min_pin: x + max_pin: x +target_platform: + - osx-arm64 +xercesc: + - "3.0.0" +zip_keys: + - - c_compiler_version + - cxx_compiler_version + - fortran_compiler_version From 2d5306d81b6b12cd9484019840ee877787f354b6 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 20:51:18 +0000 Subject: [PATCH 21/53] #29 update xsd xerces dependency --- infra/conda/xsd/4.0/variants/linux_64.yaml | 2 +- infra/conda/xsd/4.0/variants/osx_64.yaml | 4 ++-- infra/conda/xsd/4.0/variants/osx_arm64.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index 64d9c790..b910c305 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -26,7 +26,7 @@ pin_run_as_build: target_platform: - linux-64 xercesc: - - "3.0.0" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml index 117fcfeb..93a37f3e 100755 --- a/infra/conda/xsd/4.0/variants/osx_64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -12,7 +12,7 @@ channel_sources: channel_targets: - pychaste main cxx_compiler: - - gxx + - clangxx cxx_compiler_version: - "9" fortran_compiler: @@ -28,7 +28,7 @@ pin_run_as_build: target_platform: - osx-64 xercesc: - - "3.0.0" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml index 1b27ef95..74129c7f 100755 --- a/infra/conda/xsd/4.0/variants/osx_arm64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -12,7 +12,7 @@ channel_sources: channel_targets: - pychaste main cxx_compiler: - - gxx + - clangxx cxx_compiler_version: - "9" fortran_compiler: @@ -28,7 +28,7 @@ pin_run_as_build: target_platform: - osx-arm64 xercesc: - - "3.0.0" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version From 105e3ffb9b33712c32739a0f8ee0910108502c31 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 21:48:50 +0000 Subject: [PATCH 22/53] #29 get xsd patch --- infra/conda/xsd/4.0/build-package.sh | 7 ++++++- infra/conda/xsd/4.0/recipe/meta.yaml | 5 +++-- infra/conda/xsd/4.0/variants/linux_64.yaml | 5 ----- infra/conda/xsd/4.0/variants/osx_64.yaml | 7 +------ infra/conda/xsd/4.0/variants/osx_arm64.yaml | 7 +------ 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/infra/conda/xsd/4.0/build-package.sh b/infra/conda/xsd/4.0/build-package.sh index cd66a219..c3d29d22 100755 --- a/infra/conda/xsd/4.0/build-package.sh +++ b/infra/conda/xsd/4.0/build-package.sh @@ -41,6 +41,11 @@ export CPU_COUNT="${parallel:-$(nproc)}" export PYTHONUNBUFFERED=1 +# Get patches +mkdir -p "${RECIPE_ROOT}/patches/" +curl https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/xsd/4.0.0.patch -o "${RECIPE_ROOT}/patches/xsd-4.0.0.patch" +echo "55a15b7a16404e659060cc2487f198a76d96da7ec74e2c0fac9e38f24b151fa7 ${RECIPE_ROOT}/patches/xsd-4.0.0.patch" | sha256sum -c + # Configure conda build path mkdir -p "${CONDA_BLD_PATH}" @@ -86,4 +91,4 @@ conda config --env --show-sources conda list --show-channel-urls # Build conda package -conda mambabuild "${RECIPE_ROOT}" -m "${CONFIG_FILE}" +conda mambabuild "${RECIPE_ROOT}" --variant-config-files "${CONFIG_FILE}" diff --git a/infra/conda/xsd/4.0/recipe/meta.yaml b/infra/conda/xsd/4.0/recipe/meta.yaml index 61e93d04..f99586be 100644 --- a/infra/conda/xsd/4.0/recipe/meta.yaml +++ b/infra/conda/xsd/4.0/recipe/meta.yaml @@ -2,16 +2,17 @@ {% set minor_version = ".".join(version.split(".")[:2]) %} {% set build = 0 %} -{% set build_string = "py{}h{}_{}".format(CONDA_PY, PKG_HASH, build) %} +{% set build_string = "h{}_{}".format(PKG_HASH, build) %} package: name: xsd version: {{ version }} source: - fn: xsd-{{ version }}.tar.bz2 url: http://www.codesynthesis.com/download/xsd/{{ minor_version }}/xsd-{{ version }}+dep.tar.bz2 sha256: eca52a9c8f52cdbe2ae4e364e4a909503493a0d51ea388fc6c9734565a859817 + patches: + - patches/xsd-4.0.0.patch build: number: {{ build }} diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index b910c305..cd699056 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -15,10 +15,6 @@ cxx_compiler_version: - "9" docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 -fortran_compiler: - - gfortran -fortran_compiler_version: - - "9" pin_run_as_build: xercesc: min_pin: x @@ -30,4 +26,3 @@ xercesc: zip_keys: - - c_compiler_version - cxx_compiler_version - - fortran_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml index 93a37f3e..6a284a0b 100755 --- a/infra/conda/xsd/4.0/variants/osx_64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -14,11 +14,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "9" -fortran_compiler: - - gfortran -fortran_compiler_version: - - "9" + - "16" macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -32,4 +28,3 @@ xercesc: zip_keys: - - c_compiler_version - cxx_compiler_version - - fortran_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml index 74129c7f..1d007256 100755 --- a/infra/conda/xsd/4.0/variants/osx_arm64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -14,11 +14,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "9" -fortran_compiler: - - gfortran -fortran_compiler_version: - - "9" + - "16" macos_machine: - arm64-apple-darwin20.0.0 pin_run_as_build: @@ -32,4 +28,3 @@ xercesc: zip_keys: - - c_compiler_version - cxx_compiler_version - - fortran_compiler_version From e41d0bd28eadf4ecda2f0dea17f151ffbd7b0f15 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 22:18:13 +0000 Subject: [PATCH 23/53] #29 relax xsd xerces dependency --- infra/conda/xsd/4.0/recipe/build.sh | 8 ++++++-- infra/conda/xsd/4.0/variants/linux_64.yaml | 6 +----- infra/conda/xsd/4.0/variants/osx_64.yaml | 6 +----- infra/conda/xsd/4.0/variants/osx_arm64.yaml | 6 +----- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/infra/conda/xsd/4.0/recipe/build.sh b/infra/conda/xsd/4.0/recipe/build.sh index 043278a3..5c75e08b 100755 --- a/infra/conda/xsd/4.0/recipe/build.sh +++ b/infra/conda/xsd/4.0/recipe/build.sh @@ -1,5 +1,10 @@ #!/bin/bash +# https://github.com/Homebrew/homebrew-core/blob/3e856f62bfab2ff25405eaa9a40b4bad61bd4a54/Formula/x/xsd.rb +mv xsd/version xsd/version.txt +mv libxsd-frontend/version libxsd-frontend/version.txt +mv libcutl/version libcutl/version.txt + make \ CC="$CC" \ CXX="$CXX" \ @@ -7,8 +12,7 @@ make \ RANLIB="$RANLIB" \ CFLAGS="$CFLAGS" \ CPPFLAGS="$CPPFLAGS" \ - CXXFLAGS="$CXXFLAGS \ - -std=c++14" \ + CXXFLAGS="$CXXFLAGS -std=c++14" \ LDFLAGS="$LDFLAGS" \ -j $CPU_COUNT \ verbose=1 diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index cd699056..27824922 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -15,14 +15,10 @@ cxx_compiler_version: - "9" docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 -pin_run_as_build: - xercesc: - min_pin: x - max_pin: x target_platform: - linux-64 xercesc: - - "3" + - ">=3,<4" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml index 6a284a0b..06a8e189 100755 --- a/infra/conda/xsd/4.0/variants/osx_64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -17,14 +17,10 @@ cxx_compiler_version: - "16" macos_machine: - x86_64-apple-darwin13.4.0 -pin_run_as_build: - xercesc: - min_pin: x - max_pin: x target_platform: - osx-64 xercesc: - - "3" + - ">=3,<4" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml index 1d007256..96a19274 100755 --- a/infra/conda/xsd/4.0/variants/osx_arm64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -17,14 +17,10 @@ cxx_compiler_version: - "16" macos_machine: - arm64-apple-darwin20.0.0 -pin_run_as_build: - xercesc: - min_pin: x - max_pin: x target_platform: - osx-arm64 xercesc: - - "3" + - ">=3,<4" zip_keys: - - c_compiler_version - cxx_compiler_version From 526bb15aac7481d81da35f6c1838d1a5e02ef136 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 16 Apr 2024 22:52:35 +0000 Subject: [PATCH 24/53] #29 relax xsd dependencies --- infra/conda/xsd/4.0/variants/linux_64.yaml | 2 +- infra/conda/xsd/4.0/variants/osx_64.yaml | 6 +++--- infra/conda/xsd/4.0/variants/osx_arm64.yaml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index 27824922..4bec42f3 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -18,7 +18,7 @@ docker_image: target_platform: - linux-64 xercesc: - - ">=3,<4" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml index 06a8e189..f8bc8987 100755 --- a/infra/conda/xsd/4.0/variants/osx_64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: - - "16" + - "10" cdt_name: - cos7 channel_sources: @@ -14,13 +14,13 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "16" + - "10" macos_machine: - x86_64-apple-darwin13.4.0 target_platform: - osx-64 xercesc: - - ">=3,<4" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml index 96a19274..e4c5ade0 100755 --- a/infra/conda/xsd/4.0/variants/osx_arm64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: - - "16" + - "10" cdt_name: - cos7 channel_sources: @@ -14,13 +14,13 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "16" + - "10" macos_machine: - arm64-apple-darwin20.0.0 target_platform: - osx-arm64 xercesc: - - ">=3,<4" + - "3" zip_keys: - - c_compiler_version - cxx_compiler_version From e819d5f1c5908a49ba33c4fb7886c1ef22665f48 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 14:38:23 +0100 Subject: [PATCH 25/53] #29 update xsd variants --- infra/conda/xsd/4.0/recipe/build.sh | 12 +++++++----- infra/conda/xsd/4.0/recipe/meta.yaml | 4 ++-- infra/conda/xsd/4.0/variants/linux_64.yaml | 2 -- infra/conda/xsd/4.0/variants/osx_64.yaml | 6 ++---- infra/conda/xsd/4.0/variants/osx_arm64.yaml | 6 ++---- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/infra/conda/xsd/4.0/recipe/build.sh b/infra/conda/xsd/4.0/recipe/build.sh index 5c75e08b..ef213752 100755 --- a/infra/conda/xsd/4.0/recipe/build.sh +++ b/infra/conda/xsd/4.0/recipe/build.sh @@ -1,9 +1,11 @@ #!/bin/bash -# https://github.com/Homebrew/homebrew-core/blob/3e856f62bfab2ff25405eaa9a40b4bad61bd4a54/Formula/x/xsd.rb -mv xsd/version xsd/version.txt -mv libxsd-frontend/version libxsd-frontend/version.txt -mv libcutl/version libcutl/version.txt +if [[ "$target_platform" == osx-* ]]; then + # https://github.com/Homebrew/homebrew-core/blob/3e856f62/Formula/x/xsd.rb + mv xsd/version xsd/version.txt + mv libxsd-frontend/version libxsd-frontend/version.txt + mv libcutl/version libcutl/version.txt +fi make \ CC="$CC" \ @@ -12,7 +14,7 @@ make \ RANLIB="$RANLIB" \ CFLAGS="$CFLAGS" \ CPPFLAGS="$CPPFLAGS" \ - CXXFLAGS="$CXXFLAGS -std=c++14" \ + CXXFLAGS="$CXXFLAGS -std=c++11" \ LDFLAGS="$LDFLAGS" \ -j $CPU_COUNT \ verbose=1 diff --git a/infra/conda/xsd/4.0/recipe/meta.yaml b/infra/conda/xsd/4.0/recipe/meta.yaml index f99586be..be7548cb 100644 --- a/infra/conda/xsd/4.0/recipe/meta.yaml +++ b/infra/conda/xsd/4.0/recipe/meta.yaml @@ -24,9 +24,9 @@ requirements: - {{ compiler('cxx') }} - make host: - - xerces-c + - xerces-c >=3 run: - - xerces-c + - xerces-c >=3 test: commands: diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index 4bec42f3..1891fbc0 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -17,8 +17,6 @@ docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 target_platform: - linux-64 -xercesc: - - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_64.yaml b/infra/conda/xsd/4.0/variants/osx_64.yaml index f8bc8987..428295aa 100755 --- a/infra/conda/xsd/4.0/variants/osx_64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_64.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: - - "10" + - "15" cdt_name: - cos7 channel_sources: @@ -14,13 +14,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "10" + - "15" macos_machine: - x86_64-apple-darwin13.4.0 target_platform: - osx-64 -xercesc: - - "3" zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/infra/conda/xsd/4.0/variants/osx_arm64.yaml b/infra/conda/xsd/4.0/variants/osx_arm64.yaml index e4c5ade0..706a7215 100755 --- a/infra/conda/xsd/4.0/variants/osx_arm64.yaml +++ b/infra/conda/xsd/4.0/variants/osx_arm64.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: - - "10" + - "15" cdt_name: - cos7 channel_sources: @@ -14,13 +14,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: - - "10" + - "15" macos_machine: - arm64-apple-darwin20.0.0 target_platform: - osx-arm64 -xercesc: - - "3" zip_keys: - - c_compiler_version - cxx_compiler_version From 0f08777e8db907a4c5c645f41570e2adb8886835 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 15:47:25 +0000 Subject: [PATCH 26/53] #29 update build artifacts in gitignore --- infra/conda/.gitignore | 7 +++++++ infra/conda/xsd/4.0/variants/linux_64.yaml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/infra/conda/.gitignore b/infra/conda/.gitignore index 4d069c06..b30e692d 100644 --- a/infra/conda/.gitignore +++ b/infra/conda/.gitignore @@ -1,2 +1,9 @@ *.pyc build_artifacts +.bash_history +.bash_logout +.bash_profile +.bashrc +.conda/ +.condarc + diff --git a/infra/conda/xsd/4.0/variants/linux_64.yaml b/infra/conda/xsd/4.0/variants/linux_64.yaml index 1891fbc0..6af9da15 100755 --- a/infra/conda/xsd/4.0/variants/linux_64.yaml +++ b/infra/conda/xsd/4.0/variants/linux_64.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: - - "9" + - "11" cdt_name: - cos7 channel_sources: @@ -12,7 +12,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: - - "9" + - "11" docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 target_platform: From 9221ce30ff419b21c5cc2843e9067e9fffb65b4e Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 15:56:41 +0000 Subject: [PATCH 27/53] #29 remove bioconda channel --- .github/workflows/test-conda.yml | 2 +- README.md | 2 +- infra/docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-conda.yml b/.github/workflows/test-conda.yml index 2aaca494..6efaab63 100644 --- a/.github/workflows/test-conda.yml +++ b/.github/workflows/test-conda.yml @@ -24,7 +24,7 @@ jobs: miniforge-version: latest python-version: "3.10" activate-environment: pychaste_test - channels: pychaste,conda-forge,bioconda + channels: pychaste,conda-forge - name: install pychaste run: mamba install -n pychaste_test -y chaste diff --git a/README.md b/README.md index 39f3d720..baec6cd7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ PyChaste is a Python wrapper for [Chaste](https://chaste.github.io/), a general purpose simulation package for computational biology. ## Installation -`mamba install -c pychaste -c conda-forge -c bioconda chaste` +`mamba install -c pychaste -c conda-forge chaste` See the [website](https://chaste.github.io/pychaste/installation/) for a detailed guide on installing PyChaste. diff --git a/infra/docker/Dockerfile b/infra/docker/Dockerfile index dfb61051..253e393e 100644 --- a/infra/docker/Dockerfile +++ b/infra/docker/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && \ rm -rf /tmp/* USER $MAMBA_USER -RUN micromamba install -y -n base -c pychaste -c conda-forge -c bioconda chaste boost-cpp=1.74 jupyterlab && \ +RUN micromamba install -y -n base -c pychaste -c conda-forge chaste jupyterlab && \ micromamba clean --all --yes && \ rm -rf $HOME/micromamba/pkgs/* && \ rm -rf /opt/conda/pkgs/* From 1ec2903ed21a958a7e788c8cbbad6c52679f3a66 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 16:15:18 +0000 Subject: [PATCH 28/53] #42 update vtk build structure --- infra/conda/vtk/.gitignore | 3 - .../vtk/7.1.1/py310/.scripts/build_steps.sh | 63 - .../7.1.1/py310/.scripts/run_docker_build.sh | 33 - infra/conda/vtk/7.1.1/py310/build.sh | 11 - .../vtk/7.1.1/py310/recipe/manual_vtk_test.py | 56 - .../linux_64_python3.10.____cpython.yaml | 64 - .../vtk/7.1.1/py311/.scripts/build_steps.sh | 63 - .../7.1.1/py311/.scripts/run_docker_build.sh | 33 - infra/conda/vtk/7.1.1/py311/LICENSE.txt | 27 - infra/conda/vtk/7.1.1/py311/build.sh | 11 - infra/conda/vtk/7.1.1/py311/recipe/build.sh | 58 - .../vtk/7.1.1/py311/recipe/manual_vtk_test.py | 56 - infra/conda/vtk/7.1.1/py311/recipe/meta.yaml | 125 - .../recipe/patches/netcdf4-nc4file.patch | 11 - .../py311/recipe/patches/netcdf4-nc4hdf.patch | 11 - .../recipe/patches/netcdf4-nc_type.patch | 11 - .../7.1.1/py311/recipe/patches/vtk7.1.1.patch | 2251 ----------------- .../vtk/{7.1.1/py310 => 7.1}/LICENSE.txt | 0 infra/conda/vtk/7.1/build-package.sh | 92 + .../vtk/{7.1.1/py310 => 7.1}/recipe/build.sh | 0 .../vtk/{7.1.1/py310 => 7.1}/recipe/meta.yaml | 0 .../recipe/patches/netcdf4-nc4file.patch | 0 .../recipe/patches/netcdf4-nc4hdf.patch | 0 .../recipe/patches/netcdf4-nc_type.patch | 0 .../recipe/patches/vtk7.1.1.patch | 0 .../linux_64_python3.10_cpython.yaml} | 0 .../linux_64_python3.11_cpython.yaml} | 0 27 files changed, 92 insertions(+), 2887 deletions(-) delete mode 100644 infra/conda/vtk/.gitignore delete mode 100755 infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh delete mode 100755 infra/conda/vtk/7.1.1/py310/.scripts/run_docker_build.sh delete mode 100755 infra/conda/vtk/7.1.1/py310/build.sh delete mode 100644 infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py delete mode 100644 infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml delete mode 100755 infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh delete mode 100755 infra/conda/vtk/7.1.1/py311/.scripts/run_docker_build.sh delete mode 100644 infra/conda/vtk/7.1.1/py311/LICENSE.txt delete mode 100755 infra/conda/vtk/7.1.1/py311/build.sh delete mode 100755 infra/conda/vtk/7.1.1/py311/recipe/build.sh delete mode 100644 infra/conda/vtk/7.1.1/py311/recipe/manual_vtk_test.py delete mode 100755 infra/conda/vtk/7.1.1/py311/recipe/meta.yaml delete mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch delete mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch delete mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch delete mode 100644 infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch rename infra/conda/vtk/{7.1.1/py310 => 7.1}/LICENSE.txt (100%) create mode 100755 infra/conda/vtk/7.1/build-package.sh rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/build.sh (100%) rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/meta.yaml (100%) rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/patches/netcdf4-nc4file.patch (100%) rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/patches/netcdf4-nc4hdf.patch (100%) rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/patches/netcdf4-nc_type.patch (100%) rename infra/conda/vtk/{7.1.1/py310 => 7.1}/recipe/patches/vtk7.1.1.patch (100%) rename infra/conda/vtk/{7.1.1/py310/.ci_support/linux_64_python3.10.____cpython.yaml => 7.1/variants/linux_64_python3.10_cpython.yaml} (100%) rename infra/conda/vtk/{7.1.1/py311/.ci_support/linux_64_python3.11.____cpython.yaml => 7.1/variants/linux_64_python3.11_cpython.yaml} (100%) diff --git a/infra/conda/vtk/.gitignore b/infra/conda/vtk/.gitignore deleted file mode 100644 index c89ecb7d..00000000 --- a/infra/conda/vtk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pyc - -build_artifacts diff --git a/infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh b/infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh deleted file mode 100755 index f5198b92..00000000 --- a/infra/conda/vtk/7.1.1/py310/.scripts/build_steps.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/vtk/7.1.1/py310/build.sh b/infra/conda/vtk/7.1.1/py310/build.sh deleted file mode 100755 index 2fe1c271..00000000 --- a/infra/conda/vtk/7.1.1/py310/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.10.____cpython' -export UPLOAD_PACKAGES='False' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=4 - -.scripts/run_docker_build.sh diff --git a/infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py b/infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py deleted file mode 100644 index 3cb5c5cd..00000000 --- a/infra/conda/vtk/7.1.1/py310/recipe/manual_vtk_test.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python - -# This simple example shows how to do basic rendering and pipeline -# creation. - -import vtk -# The colors module defines various useful colors. -from vtk.util.colors import tomato - -# This creates a polygonal cylinder model with eight circumferential -# facets. -cylinder = vtk.vtkCylinderSource() -cylinder.SetResolution(8) - -# The mapper is responsible for pushing the geometry into the graphics -# library. It may also do color mapping, if scalars or other -# attributes are defined. -cylinderMapper = vtk.vtkPolyDataMapper() -cylinderMapper.SetInputConnection(cylinder.GetOutputPort()) - -# The actor is a grouping mechanism: besides the geometry (mapper), it -# also has a property, transformation matrix, and/or texture map. -# Here we set its color and rotate it -22.5 degrees. -cylinderActor = vtk.vtkActor() -cylinderActor.SetMapper(cylinderMapper) -cylinderActor.GetProperty().SetColor(tomato) -cylinderActor.RotateX(30.0) -cylinderActor.RotateY(-45.0) - -# Create the graphics structure. The renderer renders into the render -# window. The render window interactor captures mouse events and will -# perform appropriate camera or actor manipulation depending on the -# nature of the events. -ren = vtk.vtkRenderer() -renWin = vtk.vtkRenderWindow() -renWin.AddRenderer(ren) -iren = vtk.vtkRenderWindowInteractor() -iren.SetRenderWindow(renWin) - -# Add the actors to the renderer, set the background and size -ren.AddActor(cylinderActor) -ren.SetBackground(0.1, 0.2, 0.4) -renWin.SetSize(200, 200) - -# This allows the interactor to initalize itself. It has to be -# called before an event loop. -iren.Initialize() - -# We'll zoom in a little by accessing the camera and invoking a "Zoom" -# method on it. -ren.ResetCamera() -ren.GetActiveCamera().Zoom(1.5) -renWin.Render() - -# Start the event loop. -iren.Start() diff --git a/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml b/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml deleted file mode 100644 index fe09c1bb..00000000 --- a/infra/conda/vtk/7.1.1/py311/.ci_support/linux_64_python3.10.____cpython.yaml +++ /dev/null @@ -1,64 +0,0 @@ -cdt_name: -- cos7 -channel_sources: -- pychaste -- conda-forge -- bioconda -channel_targets: -- pychaste main -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -fortran_compiler: -- gfortran -fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' -expat: -- '2' -freetype: -- '2' -hdf5: -- '>=1.10,<1.11' -jsoncpp: -- '1.9' -jpeg: -- '9' -libpng: -- '1.6' -libtiff: -- '4' -libxml2: -- '2' -metis: -- '>=4' -mpich: -- '>=3' -parmetis: -- '>=4' -petsc: -- '>=3.12,<3.17' -sundials: -- '>=3.0,<6.0' -vtk: -- 7.1.1 -xercesc: -- '>=3' -zlib: -- '1' diff --git a/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh b/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh deleted file mode 100755 index f5198b92..00000000 --- a/infra/conda/vtk/7.1.1/py311/.scripts/build_steps.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/vtk/7.1.1/py311/LICENSE.txt b/infra/conda/vtk/7.1.1/py311/LICENSE.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/vtk/7.1.1/py311/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/vtk/7.1.1/py311/build.sh b/infra/conda/vtk/7.1.1/py311/build.sh deleted file mode 100755 index b34129e1..00000000 --- a/infra/conda/vtk/7.1.1/py311/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.11.____cpython' -export UPLOAD_PACKAGES='False' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=4 - -.scripts/run_docker_build.sh diff --git a/infra/conda/vtk/7.1.1/py311/recipe/build.sh b/infra/conda/vtk/7.1.1/py311/recipe/build.sh deleted file mode 100755 index e2f8de66..00000000 --- a/infra/conda/vtk/7.1.1/py311/recipe/build.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -set -ex - -BUILD_CONFIG=Release - -mkdir build -cd build || exit - -export CFLAGS="${CFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" -export CXXFLAGS="${CXXFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" - -cmake .. \ - -Wno-dev \ - -DCMAKE_BUILD_TYPE=$BUILD_CONFIG \ - -DCMAKE_PREFIX_PATH:PATH="${PREFIX}" \ - -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ - -DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_TESTING:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DVTK_ENABLE_VTKPYTHON:BOOL=OFF \ - -DVTK_WRAP_PYTHON:BOOL=ON \ - -DVTK_PYTHON_VERSION:STRING="${PY_VER}" \ - -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="${SP_DIR}" \ - -DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF \ - -DVTK_RENDERING_BACKEND=OpenGL2 \ - -DModule_vtkRenderingMatplotlib=ON \ - -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \ - -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \ - -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \ - -DVTK_USE_SYSTEM_PNG:BOOL=ON \ - -DVTK_USE_SYSTEM_JPEG:BOOL=ON \ - -DVTK_USE_SYSTEM_TIFF:BOOL=ON \ - -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \ - -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ - -DVTK_USE_SYSTEM_JSONCPP:BOOL=ON \ - -DVTK_USE_X:BOOL=ON \ - -DVTK_USE_CXX11_FEATURES=ON \ - -DVTK_Group_MPI=ON \ - -DMPIEXEC="${PREFIX}/bin/mpiexec" - -make -j${CPU_COUNT} -make install - -# The egg-info file is necessary because some packages, -# like mayavi, have a __requires__ in their __invtkRenderWindow::New()it__.py, -# which means pkg_resources needs to be able to find vtk. -# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects - -cat > $SP_DIR/vtk-$PKG_VERSION.egg-info < - The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, modeling, image processing, volume rendering, scientific visualization, and information visualization. - dev_url: https://gitlab.kitware.com/vtk/vtk - doc_url: https://vtk.org/documentation diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch deleted file mode 100644 index b1a50faa..00000000 --- a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4file.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c -+++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4file.c -@@ -8,6 +8,8 @@ - COPYRIGHT file for copying and redistribution conditions. - */ - -+#define H5_USE_110_API -+ - #include "nc4internal.h" - #include "nc.h" - #include diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch deleted file mode 100644 index 197dc77a..00000000 --- a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc4hdf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c -+++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4hdf.c -@@ -13,6 +13,8 @@ - $Id: nc4hdf.c,v 1.273 2010/05/27 21:34:14 dmh Exp $ - */ - -+#define H5_USE_110_API -+ - #include "config.h" - #include "nc4internal.h" - #include diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch deleted file mode 100644 index ba9e3f9e..00000000 --- a/infra/conda/vtk/7.1.1/py311/recipe/patches/netcdf4-nc_type.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4internal.c -+++ b/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4internal.c -@@ -380,7 +380,7 @@ - - /* Recursively hunt for a netCDF type id. */ - NC_TYPE_INFO_T * --nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, nc_type target_nc_typeid) -+nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, hid_t target_nc_typeid) - { - NC_GRP_INFO_T *g; - NC_TYPE_INFO_T *type, *res; diff --git a/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch b/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch deleted file mode 100644 index cb95e48d..00000000 --- a/infra/conda/vtk/7.1.1/py311/recipe/patches/vtk7.1.1.patch +++ /dev/null @@ -1,2251 +0,0 @@ -unchanged: ---- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx -+++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx -@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) - // Help Tcl find the Tcl/Tk helper files. - const char* relative_dirs[] = - { -+ "../share/tcltk", -+ "../../share/tcltk", - "TclTk/lib", - ".." VTK_INSTALL_TCL_DIR, - 0 -unchanged: ---- a/CMake/vtkModuleMacros.cmake -+++ b/CMake/vtkModuleMacros.cmake -@@ -417,8 +417,8 @@ - function(vtk_target_name _name) - get_property(_type TARGET ${_name} PROPERTY TYPE) - if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) -- set_property(TARGET ${_name} PROPERTY VERSION 1) -- set_property(TARGET ${_name} PROPERTY SOVERSION 1) -+ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p.${VTK_BUILD_VERSION}) -+ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p) - endif() - if("${_name}" MATCHES "^[Vv][Tt][Kk]") - set(_vtk "") -unchanged: ---- a/Rendering/Tk/CMakeLists.txt -+++ b/Rendering/Tk/CMakeLists.txt -@@ -118,7 +118,7 @@ - vtk_target_install(vtkRenderingPythonTkWidgets) - - set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME -- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) -+ vtkRenderingPythonTkWidgets) - - set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) - if(VTK_USE_X) -unchanged: ---- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -@@ -156,6 +156,10 @@ - * to implement IsAvailable. - */ - static Availability CheckMPLAvailability(); -+ static void DisableMPL() -+ { -+ MPLMathTextAvailable = UNAVAILABLE; -+ }; - - //@{ - /** -unchanged: ---- a/IO/SQL/vtkSQLiteDatabase.cxx -+++ b/IO/SQL/vtkSQLiteDatabase.cxx -@@ -29,7 +29,7 @@ - #include - #include - --#include -+#include - - vtkStandardNewMacro(vtkSQLiteDatabase); - -@@ -307,15 +307,15 @@ - } - } - -- int result = vtk_sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); -+ int result = sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); - -- if (result != VTK_SQLITE_OK) -+ if (result != SQLITE_OK) - { - vtkDebugMacro(<<"SQLite open() failed. Error code is " - << result << " and message is " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - -- vtk_sqlite3_close(this->SQLiteInstance); -+ sqlite3_close(this->SQLiteInstance); - return false; - } - else -@@ -334,8 +334,8 @@ - } - else - { -- int result = vtk_sqlite3_close(this->SQLiteInstance); -- if (result != VTK_SQLITE_OK) -+ int result = sqlite3_close(this->SQLiteInstance); -+ if (result != SQLITE_OK) - { - vtkWarningMacro(<< "Close(): SQLite returned result code " << result); - } -@@ -368,13 +368,13 @@ - } - - vtkSQLQuery *query = this->GetQueryInstance(); -- query->SetQuery("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"); -+ query->SetQuery("SELECT name FROM sqlite3_master WHERE type='table' ORDER BY name"); - bool status = query->Execute(); - - if (!status) - { - vtkErrorMacro(<< "GetTables(): Database returned error: " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - query->Delete(); - return this->Tables; - } -@@ -403,7 +403,7 @@ - if (!status) - { - vtkErrorMacro(<< "GetRecord(" << table << "): Database returned error: " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - query->Delete(); - return NULL; - } -@@ -467,10 +467,10 @@ - // ---------------------------------------------------------------------- - bool vtkSQLiteDatabase::HasError() - { -- return (vtk_sqlite3_errcode(this->SQLiteInstance)!=VTK_SQLITE_OK); -+ return (sqlite3_errcode(this->SQLiteInstance)!=SQLITE_OK); - } - - const char* vtkSQLiteDatabase::GetLastErrorText() - { -- return vtk_sqlite3_errmsg(this->SQLiteInstance); -+ return sqlite3_errmsg(this->SQLiteInstance); - } -unchanged: ---- a/IO/SQL/vtkSQLiteDatabase.h -+++ b/IO/SQL/vtkSQLiteDatabase.h -@@ -52,7 +52,7 @@ - class vtkSQLQuery; - class vtkSQLiteQuery; - class vtkStringArray; --struct vtk_sqlite3; -+struct sqlite3; - - class VTKIOSQL_EXPORT vtkSQLiteDatabase : public vtkSQLDatabase - { -@@ -167,7 +167,7 @@ - virtual bool ParseURL(const char* url); - - private: -- vtk_sqlite3 *SQLiteInstance; -+ sqlite3 *SQLiteInstance; - - // We want this to be private, a user of this class - // should not be setting this for any reason -unchanged: ---- a/IO/SQL/vtkSQLiteQuery.cxx -+++ b/IO/SQL/vtkSQLiteQuery.cxx -@@ -25,7 +25,7 @@ - #include "vtkVariant.h" - #include "vtkVariantArray.h" - --#include -+#include - - #include - -@@ -43,7 +43,7 @@ - { - this->Statement = NULL; - this->InitialFetch = true; -- this->InitialFetchResult=VTK_SQLITE_DONE; -+ this->InitialFetchResult=SQLITE_DONE; - this->LastErrorText = NULL; - this->TransactionInProgress = false; - } -@@ -61,7 +61,7 @@ - { - if (this->Database != NULL) - { -- vtk_sqlite3_finalize(this->Statement); -+ sqlite3_finalize(this->Statement); - this->Statement = NULL; - } - } -@@ -128,8 +128,8 @@ - if (this->Statement) - { - vtkDebugMacro(<<"Finalizing old statement"); -- int finalizeStatus = vtk_sqlite3_finalize(this->Statement); -- if (finalizeStatus != VTK_SQLITE_OK) -+ int finalizeStatus = sqlite3_finalize(this->Statement); -+ if (finalizeStatus != SQLITE_OK) - { - vtkWarningMacro(<<"SetQuery(): Finalize returned unexpected code " - << finalizeStatus); -@@ -148,19 +148,19 @@ - return false; - } - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - const char *unused_statement; - -- int prepareStatus = vtk_sqlite3_prepare_v2(db, -+ int prepareStatus = sqlite3_prepare_v2(db, - this->Query, - static_cast(strlen(this->Query)), - &this->Statement, - &unused_statement); - -- if (prepareStatus != VTK_SQLITE_OK) -+ if (prepareStatus != SQLITE_OK) - { -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -- vtkWarningMacro(<<"SetQuery(): vtk_sqlite3_prepare_v2() failed with error message " -+ this->SetLastErrorText(sqlite3_errmsg(db)); -+ vtkWarningMacro(<<"SetQuery(): sqlite3_prepare_v2() failed with error message " - << this->GetLastErrorText() - << " on statement: '" - << this->Query << "'"); -@@ -191,31 +191,31 @@ - } - else - { -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - - vtkDebugMacro(<<"Execute(): Query ready to execute."); - - this->InitialFetch = true; -- int result = vtk_sqlite3_step(this->Statement); -+ int result = sqlite3_step(this->Statement); - this->InitialFetchResult = result; - -- if (result == VTK_SQLITE_DONE) -+ if (result == SQLITE_DONE) - { - this->SetLastErrorText(NULL); - this->Active = true; - return true; - } -- else if (result != VTK_SQLITE_ROW) -+ else if (result != SQLITE_ROW) - { - vtkSQLiteDatabase *dbContainer = - vtkSQLiteDatabase::SafeDownCast(this->Database); - assert(dbContainer != NULL); - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -- vtkDebugMacro(<< "Execute(): vtk_sqlite3_step() returned error message " -+ this->SetLastErrorText(sqlite3_errmsg(db)); -+ vtkDebugMacro(<< "Execute(): sqlite3_step() returned error message " - << this->GetLastErrorText()); - this->Active = false; - return false; -@@ -236,7 +236,7 @@ - } - else - { -- return vtk_sqlite3_column_count(this->Statement); -+ return sqlite3_column_count(this->Statement); - } - } - -@@ -256,7 +256,7 @@ - } - else - { -- return vtk_sqlite3_column_name(this->Statement, column); -+ return sqlite3_column_name(this->Statement, column); - } - } - -@@ -276,22 +276,22 @@ - } - else - { -- switch (vtk_sqlite3_column_type(this->Statement, column)) -+ switch (sqlite3_column_type(this->Statement, column)) - { -- case VTK_SQLITE_INTEGER: -+ case SQLITE_INTEGER: - return VTK_INT; -- case VTK_SQLITE_FLOAT: -+ case SQLITE_FLOAT: - return VTK_FLOAT; -- case VTK_SQLITE_TEXT: -+ case SQLITE_TEXT: - return VTK_STRING; -- case VTK_SQLITE_BLOB: -+ case SQLITE_BLOB: - return VTK_STRING; // until we have a BLOB type of our own -- case VTK_SQLITE_NULL: -+ case SQLITE_NULL: - return VTK_VOID; // ??? what makes sense here? - default: - { - vtkErrorMacro(<<"GetFieldType(): Unknown data type " -- << vtk_sqlite3_column_type(this->Statement, column) -+ << sqlite3_column_type(this->Statement, column) - <<" from SQLite."); - return VTK_VOID; - } -@@ -312,7 +312,7 @@ - { - vtkDebugMacro(<<"NextRow(): Initial fetch being handled."); - this->InitialFetch = false; -- if (this->InitialFetchResult == VTK_SQLITE_DONE) -+ if (this->InitialFetchResult == SQLITE_DONE) - { - return false; - } -@@ -323,12 +323,12 @@ - } - else - { -- int result = vtk_sqlite3_step(this->Statement); -- if (result == VTK_SQLITE_DONE) -+ int result = sqlite3_step(this->Statement); -+ if (result == SQLITE_DONE) - { - return false; - } -- else if (result == VTK_SQLITE_ROW) -+ else if (result == SQLITE_ROW) - { - return true; - } -@@ -336,8 +336,8 @@ - { - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -+ sqlite3 *db = dbContainer->SQLiteInstance; -+ this->SetLastErrorText(sqlite3_errmsg(db)); - vtkErrorMacro(<<"NextRow(): Database returned error code " - << result << " with the following message: " - << this->GetLastErrorText()); -@@ -363,33 +363,33 @@ - } - else - { -- switch (vtk_sqlite3_column_type(this->Statement, column)) -+ switch (sqlite3_column_type(this->Statement, column)) - { -- case VTK_SQLITE_INTEGER: -- return vtkVariant(vtk_sqlite3_column_int(this->Statement, column)); -+ case SQLITE_INTEGER: -+ return vtkVariant(sqlite3_column_int(this->Statement, column)); - -- case VTK_SQLITE_FLOAT: -- return vtkVariant(vtk_sqlite3_column_double(this->Statement, column)); -+ case SQLITE_FLOAT: -+ return vtkVariant(sqlite3_column_double(this->Statement, column)); - -- case VTK_SQLITE_TEXT: -+ case SQLITE_TEXT: - { - std::ostringstream str; -- str << vtk_sqlite3_column_text(this->Statement, column); -+ str << sqlite3_column_text(this->Statement, column); - return vtkVariant(vtkStdString(str.str())); - } - -- case VTK_SQLITE_BLOB: -+ case SQLITE_BLOB: - { - // This is a hack ... by passing the BLOB to vtkStdString with an explicit - // byte count, we ensure that the string will store all of the BLOB's bytes, - // even if there are NULL values. - - return vtkVariant(vtkStdString( -- static_cast(vtk_sqlite3_column_blob(this->Statement, column)), -- vtk_sqlite3_column_bytes(this->Statement, column))); -+ static_cast(sqlite3_column_blob(this->Statement, column)), -+ sqlite3_column_bytes(this->Statement, column))); - } - -- case VTK_SQLITE_NULL: -+ case SQLITE_NULL: - default: - return vtkVariant(); - } -@@ -420,11 +420,11 @@ - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = true; - this->SetLastErrorText(NULL); -@@ -448,7 +448,7 @@ - { - if (this->Statement) - { -- vtk_sqlite3_finalize(this->Statement); -+ sqlite3_finalize(this->Statement); - this->Statement = NULL; - } - -@@ -460,11 +460,11 @@ - - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = false; - this->SetLastErrorText(NULL); -@@ -496,11 +496,11 @@ - - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = false; - this->SetLastErrorText(NULL); -@@ -644,14 +644,14 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } -- int status = vtk_sqlite3_bind_int(this->Statement, index+1, value); -+ int status = sqlite3_bind_int(this->Statement, index+1, value); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_int returned error: " << status; -+ errormessage << "sqlite3_bind_int returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } -- int status = vtk_sqlite3_bind_int(this->Statement, index+1, static_cast(value)); -+ int status = sqlite3_bind_int(this->Statement, index+1, static_cast(value)); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_int64 returned error: " << status; -+ errormessage << "sqlite3_bind_int64 returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -702,15 +702,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_bind_double(this->Statement, index+1, value); -+ int status = sqlite3_bind_double(this->Statement, index+1, value); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_double returned error: " << status; -+ errormessage << "sqlite3_bind_double returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -731,15 +731,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_bind_text(this->Statement, index+1, value, length, VTK_SQLITE_TRANSIENT); -+ int status = sqlite3_bind_text(this->Statement, index+1, value, length, SQLITE_TRANSIENT); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_text returned error: " << status; -+ errormessage << "sqlite3_bind_text returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -760,20 +760,20 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - - int status = -- vtk_sqlite3_bind_blob(this->Statement, -+ sqlite3_bind_blob(this->Statement, - index+1, - data, - length, -- VTK_SQLITE_TRANSIENT); -+ SQLITE_TRANSIENT); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_blob returned error: " << status; -+ errormessage << "sqlite3_bind_blob returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -794,15 +794,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_clear_bindings(this->Statement); -+ int status = sqlite3_clear_bindings(this->Statement); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_clear_bindings returned error: " << status; -+ errormessage << "sqlite3_clear_bindings returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -unchanged: ---- a/IO/SQL/vtkSQLiteQuery.h -+++ b/IO/SQL/vtkSQLiteQuery.h -@@ -50,7 +50,7 @@ - class vtkSQLiteDatabase; - class vtkVariant; - class vtkVariantArray; --struct vtk_sqlite3_stmt; -+struct sqlite3_stmt; - - class VTKIOSQL_EXPORT vtkSQLiteQuery : public vtkSQLQuery - { -@@ -175,7 +175,7 @@ - vtkSQLiteQuery(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; - void operator=(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; - -- vtk_sqlite3_stmt *Statement; -+ sqlite3_stmt *Statement; - bool InitialFetch; - int InitialFetchResult; - char *LastErrorText; -unchanged: ---- a/ThirdParty/sqlite/CMakeLists.txt -+++ b/ThirdParty/sqlite/CMakeLists.txt -@@ -1,4 +1,4 @@ - set(vtksqlite_THIRD_PARTY 1) --set(vtksqlite_LIBRARIES vtksqlite) -+set(vtksqlite_LIBRARIES sqlite3) - vtk_module_export_info() --add_subdirectory(vtksqlite) -+ -unchanged: ---- a/Parallel/MPI4Py/CMakeLists.txt -+++ b/Parallel/MPI4Py/CMakeLists.txt -@@ -18,7 +18,7 @@ - mark_as_advanced(MPI4PY_INCLUDE_DIR) - endif() - else() -- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") -+ set(MPI4PY_INCLUDE_DIR "/usr/include") - endif() - include_directories("${MPI4PY_INCLUDE_DIR}") - -unchanged: ---- a/Parallel/MPI4Py/module.cmake -+++ b/Parallel/MPI4Py/module.cmake -@@ -2,8 +2,6 @@ - vtk_module(vtkParallelMPI4Py - GROUPS - MPI -- COMPILE_DEPENDS -- vtkmpi4py - EXCLUDE_FROM_TCL_WRAPPING - EXCLUDE_FROM_JAVA_WRAPPING - KIT -@@ -14,4 +12,4 @@ - PRIVATE_DEPENDS - vtkParallelMPI - ) --endif () -\ No newline at end of file -+endif () -unchanged: ---- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -+++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -@@ -1113,7 +1113,10 @@ - vtkIdType cellsPerNode = numTotalCells / nprocs; - - vtkIdList **sendCells = new vtkIdList * [ nprocs ]; -- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ -+ if (sizeof(vtkIdList *) * nprocs > 0) { -+ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ } - - if (numConsumers == nprocs - 1) - { -@@ -1598,7 +1601,9 @@ - // Exchange int arrays - - float **recvArrays = new float * [nprocs]; -- memset(recvArrays, 0, sizeof(float *) * nprocs); -+ if (sizeof(float *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(float *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -1720,7 +1725,9 @@ - // Exchange int arrays - - vtkIdType **recvArrays = new vtkIdType * [nprocs]; -- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ if (sizeof(vtkIdType *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -2789,7 +2796,9 @@ - - unsigned char *vals = new unsigned char [npoints]; - -- memset(vals, val, npoints); -+ if (npoints > 0) { -+ memset(vals, val, npoints); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -2809,7 +2818,9 @@ - - unsigned char *vals = new unsigned char [ncells]; - -- memset(vals, val, ncells); -+ if (ncells > 0) { -+ memset(vals, val, ncells); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -3008,7 +3019,9 @@ - vtkIdType nGridPoints = grid->GetNumberOfPoints(); - - vtkIdType *numPointsOutside = new vtkIdType [nprocs]; -- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ if (sizeof(vtkIdType) * nprocs > 0) { -+ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ } - - vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); - globalIds->SetNumberOfValues(nGridPoints); -@@ -3090,10 +3103,16 @@ - // global ID back? - - vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; -- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ -+ if (sizeof(vtkFloatArray *) * nprocs > 0) { -+ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ } - - vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; -- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - vtkIdType *next = new vtkIdType [nprocs]; - vtkIdType *next3 = new vtkIdType [nprocs]; -@@ -3268,7 +3287,9 @@ - { - // There are no cells in my assigned region - -- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - return gids; - } -@@ -3473,7 +3494,10 @@ - std::multimap::iterator mapIt; - - vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; -- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { -+ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ } - - for (int i=0; iGetNumberOfPoints(); - - vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; -- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs) { -+ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - if (numPoints < 1) - { -unchanged: ---- a/Examples/Infovis/Cxx/CMakeLists.txt -+++ b/Examples/Infovis/Cxx/CMakeLists.txt -@@ -48,15 +48,6 @@ - target_link_LIBRARIES(MultiView ${VTK_LIBRARIES}) - endif() - --# If Qt is enabled include the QT based examples --if(vtkGUISupportQt_LOADED AND vtkViewsQt_LOADED) -- add_subdirectory(EasyView) -- add_subdirectory(CustomLinkView) -- if(vtkIOSQL_LOADED) -- add_subdirectory(StatsView) -- endif() --endif() -- - if(vtkInfovisParallel_LOADED) - add_executable(ParallelBFS ParallelBFS.cxx) - find_package(MPI REQUIRED) -unchanged: ---- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt -+++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt -@@ -80,6 +80,8 @@ if(APPLE) - set(JAVAC_OPTIONS -J-Xmx512m) - endif() - -+set(JAVAC_OPTIONS -J-Xmx1024m) -+ - get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) - foreach(module IN LISTS java_modules) - if(NOT ${module}_EXCLUDE_FROM_WRAPPING) -unchanged: ---- VTK-6.3.0.orig/CMake/vtkJavaWrapping.cmake -+++ VTK-6.3.0/CMake/vtkJavaWrapping.cmake -@@ -79,7 +79,7 @@ function(vtk_add_java_wrapping module_na - install(TARGETS ${module_name}Java - EXPORT ${VTK_INSTALL_EXPORT_NAME} - RUNTIME DESTINATION ${VTK_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries -- LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries -+ LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/jni COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development) - endif() - endfunction() -unchanged: ---- b/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -200,7 +200,7 @@ - endif() - - # default to not using the system GLEW as ours has fixes in it right now --set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) -+set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) - - set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - -@@ -540,9 +540,7 @@ - - # The doxygen documentation needs to be aware of all modules. - option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) --if(BUILD_DOCUMENTATION) -- add_subdirectory(Utilities/Doxygen) --endif() -+add_subdirectory(Utilities/Doxygen) - - # If python wrapping and testing is enabled then add driver scripts to run - # tests. Note: Many pythong tests used to be automatically converted from TCL -unchanged: ---- a/Rendering/OpenGL2/CMakeLists.txt -+++ b/Rendering/OpenGL2/CMakeLists.txt -@@ -353,7 +353,7 @@ - vtk_opengl_link(${vtk-module}) - if(VTK_USE_X) - vtk_module_link_libraries(${vtk-module} -- LINK_PUBLIC ${X11_LIBRARIES} ${X11_Xt_LIB}) -+ LINK_PUBLIC ${GLEW_LIBRARY} ${X11_LIBRARIES} ${X11_Xt_LIB}) - elseif(VTK_USE_COCOA) - vtk_module_link_libraries(${vtk-module} LINK_PUBLIC "-framework Cocoa") - endif() -unchanged: ---- b/Utilities/Doxygen/CMakeLists.txt -+++ b/Utilities/Doxygen/CMakeLists.txt -@@ -1,69 +1,79 @@ - # - # Build the documentation - # --find_package(Doxygen REQUIRED) --find_package(Perl REQUIRED) --find_package(HTMLHelp) -+if (BUILD_DOCUMENTATION) -+ find_package(Doxygen REQUIRED) -+ find_package(Perl REQUIRED) -+ find_package(HTMLHelp) - --option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) --option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) --option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) --mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) --if(DOXYGEN_SHORT_NAMES) -- set(DOXYGEN_SHORT_NAMES YES) --else() -- set(DOXYGEN_SHORT_NAMES NO) --endif() --if(DOXYGEN_GENERATE_HTMLHELP) -- set(DOXYGEN_GENERATE_HTMLHELP YES) --else() -- set(DOXYGEN_GENERATE_HTMLHELP NO) --endif() -- --# --# Configure the script and the doxyfile, then add target --# --set(HAVE_DOT_YESNO NO) --if(DOT) -- set(HAVE_DOT_YESNO YES) -- if(NOT DOT_PATH) -- get_filename_component(DOT_PATH ${DOT} PATH) -+ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) -+ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) -+ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) -+ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) -+ if(DOXYGEN_SHORT_NAMES) -+ set(DOXYGEN_SHORT_NAMES YES) -+ else() -+ set(DOXYGEN_SHORT_NAMES NO) - endif() --endif() -- --# Build up a list of all module source directories. Note that this should be --# all source directories and so does not use the normal variables. --unset(VTK_MODULE_DIRS_DOXYGEN) --file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") --foreach(module ${src}) -- get_filename_component(module_BASE ${module} PATH) -- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -- # Skip the utilities and third parties directories. -+ if(DOXYGEN_GENERATE_HTMLHELP) -+ set(DOXYGEN_GENERATE_HTMLHELP YES) - else() -- # Use both the source and binary directories, this ensures that -- # generated files will be included, but they may then be architecture, -- # build configuration and/or compiler specific. All source directories -- # are included whether the module is enabled or not. -- set(VTK_MODULE_DIRS_DOXYGEN -- "${VTK_MODULE_DIRS_DOXYGEN} -+ set(DOXYGEN_GENERATE_HTMLHELP NO) -+ endif() -+ -+ # -+ # Configure the script and the doxyfile, then add target -+ # -+ set(HAVE_DOT_YESNO NO) -+ if(DOT) -+ set(HAVE_DOT_YESNO YES) -+ if(NOT DOT_PATH) -+ get_filename_component(DOT_PATH ${DOT} PATH) -+ endif() -+ endif() -+ -+ # Build up a list of all module source directories. Note that this should be -+ # all source directories and so does not use the normal variables. -+ unset(VTK_MODULE_DIRS_DOXYGEN) -+ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") -+ foreach(module ${src}) -+ get_filename_component(module_BASE ${module} PATH) -+ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -+ # Skip the utilities and third parties directories. -+ else() -+ # Use both the source and binary directories, this ensures that -+ # generated files will be included, but they may then be architecture, -+ # build configuration and/or compiler specific. All source directories -+ # are included whether the module is enabled or not. -+ set(VTK_MODULE_DIRS_DOXYGEN -+ "${VTK_MODULE_DIRS_DOXYGEN} - \"${VTK_SOURCE_DIR}/${module_BASE}\" - \"${VTK_BINARY_DIR}/${module_BASE}\"") -- endif() --endforeach() -+ endif() -+ endforeach() -+ -+ FIND_PATH(MATHJAX_CODEFILE MathJax.js -+ PATHS -+ /usr/share/mathjax/ -+ /usr/share/javascript/ -+ /usr/share/javascript/mathjax/ -+ ) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ @ONLY) -+ -+ add_custom_target(DoxygenDoc -+ ${CMAKE_COMMAND} -+ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) - --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -- --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- @ONLY) -- --add_custom_target(DoxygenDoc -- ${CMAKE_COMMAND} -- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) -+endif() - - if(NOT VTK_INSTALL_NO_DOCUMENTATION) - macro(__vtk_install_documentation_files glob) -unchanged: ---- a/Utilities/Doxygen/doxyfile.in -+++ b/Utilities/Doxygen/doxyfile.in -@@ -19,6 +19,9 @@ - GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" - - PDF_HYPERLINKS = YES -+USE_MATHJAX = YES -+MATHJAX_RELPATH = @MATHJAX_CODEFILE@ -+ - - HAVE_DOT = @HAVE_DOT_YESNO@ - DOT_PATH = "@DOT_PATH@" -unchanged: ---- a/Wrapping/Java/CMakeLists.txt -+++ b/Wrapping/Java/CMakeLists.txt -@@ -259,7 +259,7 @@ - if(VTK_JAVA_SWT_COMPONENT) - set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} - rendering/SwtConeRendering -- ) -+q ) - endif() - endif() - -@@ -358,11 +358,10 @@ - COMMENT "Compiling Java Classes" - ) - --# Create the JAR file containing all compiled classes and -+ - add_custom_command( -- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" -- -C ${VTK_BINARY_DIR}/java -- vtk -+ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list -+ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list - DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} - OUTPUT ${VTK_JAR_PATH}/vtk.jar - COMMENT "Java Archive" -unchanged: ---- a/Wrapping/PythonCore/vtkPythonArgs.cxx -+++ b/Wrapping/PythonCore/vtkPythonArgs.cxx -@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) - else if (PyUnicode_Check(o)) - { - #if PY_VERSION_HEX >= 0x03030000 -- a = PyUnicode_AsUTF8(o); -+ a = const_cast(PyUnicode_AsUTF8(o)); - return true; - #else - PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); -unchanged: ---- a/Utilities/Doxygen/doc_class2example.pl -+++ b/Utilities/Doxygen/doc_class2example.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2004-06-09 11:12:38 barre> - # - # Build cross-references between classes and examples -unchanged: ---- a/Utilities/Doxygen/doc_cleanhtml.pl -+++ b/Utilities/Doxygen/doc_cleanhtml.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-10-25 20:17:59 barre> - # - # Clean the HTML generated by Doxygen to remove some layout quicks -unchanged: ---- a/Utilities/Doxygen/doc_codematch.pl -+++ b/Utilities/Doxygen/doc_codematch.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-01-18 16:17:26 barre> - # - # Summary ? -unchanged: ---- a/Utilities/Doxygen/doc_contributors.pl -+++ b/Utilities/Doxygen/doc_contributors.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-11-01 15:33:04 barre> - # - # Get author and contributors. -unchanged: ---- a/Utilities/Doxygen/doc_header2doxygen.pl -+++ b/Utilities/Doxygen/doc_header2doxygen.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2011-01-16 21:15:53 barre> - # - # Convert VTK headers to doxygen format -unchanged: ---- a/Utilities/Doxygen/doc_index.pl -+++ b/Utilities/Doxygen/doc_index.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-11-21 17:40:48 barre> - # - # Build full-text index -unchanged: ---- a/Utilities/Doxygen/doc_rmpath.pl -+++ b/Utilities/Doxygen/doc_rmpath.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-10-05 11:49:40 barre> - # - # Remove path to intermediate Doxygen dir from html doc -unchanged: ---- a/Utilities/Doxygen/doc_version.pl -+++ b/Utilities/Doxygen/doc_version.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2006-11-15 13:25:02 barre> - # - # Extract VTK version and add it to documentation -unchanged: ---- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -+++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa - #elif defined(__XTENSA_EL__) - # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE - -+/* RISC-V */ -+#elif defined(__riscv) || defined(__riscv__) -+# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE -+ - /* Unknown CPU */ - #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) - # error "Byte order of target CPU unknown." -unchanged: ---- a/Wrapping/Python/vtk/numpy_interface/algorithms.py -+++ b/Wrapping/Python/vtk/numpy_interface/algorithms.py -@@ -197,7 +197,7 @@ - return dsa.NoneArray; - - if res is dsa.NoneArray: -- if max_dims is 1: -+ if max_dims == 1: - # Weird trick to make the array look like a scalar - max_dims = () - res = numpy.empty(max_dims) -unchanged: ---- a/CMake/VTKGenerateExportHeader.cmake -+++ b/CMake/VTKGenerateExportHeader.cmake -@@ -174,7 +174,7 @@ - execute_process(COMMAND ${CMAKE_C_COMPILER} --version - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) -- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" - _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the - # patch level, handle this here: -unchanged: ---- a/IO/MySQL/vtkMySQLDatabasePrivate.h -+++ b/IO/MySQL/vtkMySQLDatabasePrivate.h -@@ -7,6 +7,10 @@ - - #include "vtkIOMySQLModule.h" // For export macro - #include // needed for MYSQL typedefs -+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ -+ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 -+typedef bool my_bool; -+#endif - - class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate - { -unchanged: ---- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -273,8 +273,7 @@ - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -+++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); - namespace - { - // The FreeType face requester callback: --FT_CALLBACK_DEF(FT_Error) --vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- vtk7-7.1.1+dfsg2.orig/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx -+++ vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx -@@ -52,7 +52,7 @@ - XdmfErrorMessage("Cannot Receive Message of Length = " << Msg->Length); - return(XDMF_FAIL); - } -- if(Msg->Data <= 0 ){ -+ if(!Msg->Data){ - XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << Msg->Length); - return(XDMF_FAIL); - } -@@ -66,7 +66,7 @@ - XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length); - return(XDMF_FAIL); - } -- if(Msg->Data <= 0 ){ -+ if(!Msg->Data){ - XdmfErrorMessage("Cannot Send Message from Data Buffer = " << Msg->Length); - return(XDMF_FAIL); - } -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h -@@ -66,7 +66,7 @@ - { - } - -- bool operator () ( const vtkIdType& a, const vtkIdType& b ) -+ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const - { - if (0 == this->Hierarchy) - { -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx -@@ -525,7 +525,7 @@ - { - public: - bool operator()(const vtkHierarchyNode & a, -- const vtkHierarchyNode & b) -+ const vtkHierarchyNode & b) const - { - if (a.Level != b.Level) - { -only in patch2: -unchanged: ---- a/CMake/FindFFMPEG.cmake -+++ b/CMake/FindFFMPEG.cmake -@@ -107,13 +107,14 @@ - FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) - FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) - FFMPEG_FIND(LIBAVUTIL avutil avutil.h) -+FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) - FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. - - SET(FFMPEG_FOUND "NO") - - # Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND, - # and FFMPEG_LIBAVUTIL_FOUND as they are optional. --IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK) -+IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK) - - SET(FFMPEG_FOUND "YES") - -only in patch2: -unchanged: ---- a/IO/FFMPEG/CMakeLists.txt -+++ b/IO/FFMPEG/CMakeLists.txt -@@ -22,7 +22,7 @@ - ) - - set(_ffmpeg_libs ${FFMPEG_LIBAVFORMAT_LIBRARIES} ${FFMPEG_LIBAVCODEC_LIBRARIES} -- ${FFMPEG_LIBAVUTIL_LIBRARIES} -+ ${FFMPEG_LIBAVUTIL_LIBRARIES} ${FFMPEG_LIBSWRESAMPLE_LIBRARIES} - ) - - if(NOT VTK_FFMPEG_HAS_IMG_CONVERT) -only in patch2: -unchanged: ---- a/IO/FFMPEG/vtkFFMPEGWriter.cxx -+++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx -@@ -15,99 +15,77 @@ - - #include "vtkFFMPEGWriter.h" - -+#include "vtkErrorCode.h" - #include "vtkImageData.h" - #include "vtkObjectFactory.h" --#include "vtkErrorCode.h" --#include "vtkFFMPEGConfig.h" - --extern "C" { --#ifdef VTK_FFMPEG_HAS_OLD_HEADER --# include --#else --# include --#endif -- --#ifndef VTK_FFMPEG_HAS_IMG_CONVERT --# ifdef VTK_FFMPEG_HAS_OLD_HEADER --# include --# else --# include --# endif --#endif -+extern "C" -+{ -+#include -+#include -+#include - } - --#ifdef __GNUC__ --#pragma GCC diagnostic ignored "-Wdeprecated-declarations" --#endif -- --#if LIBAVCODEC_VERSION_MAJOR < 55 --# define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG --# define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO --# define AV_PIX_FMT_BGR24 PIX_FMT_BGR24 --# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 --# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P -+#if LIBAVFORMAT_VERSION_MAJOR < 59 -+#define vtk_ff_const59 -+#else -+#define vtk_ff_const59 const - #endif - --#if LIBAVCODEC_VERSION_MAJOR < 56 || \ -- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 || \ -- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR == 28 && LIBAVCODEC_VERSION_MICRO < 1 --# define av_frame_alloc avcodec_alloc_frame -+#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 -+extern "C" -+{ -+#include -+} - #endif - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - class vtkFFMPEGWriterInternal -- { -+{ - public: -- vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator); -+ vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator); - ~vtkFFMPEGWriterInternal(); - - int Start(); -- int Write(vtkImageData *id); -+ int Write(vtkImageData* id); - void End(); - - int Dim[2]; - int FrameRate; - - private: -+ vtkFFMPEGWriter* Writer; - -- vtkFFMPEGWriter *Writer; -+ AVFormatContext* avFormatContext; - -- AVFormatContext *avFormatContext; -+ vtk_ff_const59 AVOutputFormat* avOutputFormat; - -- AVOutputFormat *avOutputFormat; -+ AVStream* avStream; - -- AVStream *avStream; -+ AVFrame* rgbInput; -+ AVFrame* yuvOutput; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- unsigned char *codecBuf; -- int codecBufSize; --#endif -- -- AVFrame *rgbInput; -- AVFrame *yuvOutput; -+ AVCodecContext* avCodecContext; - - int openedFile; - int closedFile; -- }; -+}; - --//--------------------------------------------------------------------------- --vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator) -+//------------------------------------------------------------------------------ -+vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator) - { - this->Writer = creator; - this->Dim[0] = 0; - this->Dim[1] = 0; - -- this->avFormatContext = NULL; -+ this->avFormatContext = nullptr; - -- this->avOutputFormat = NULL; -+ this->avOutputFormat = nullptr; - -- this->avStream = NULL; -+ this->avStream = nullptr; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- this->codecBuf = NULL; --#endif -- this->rgbInput = NULL; -- this->yuvOutput = NULL; -+ this->rgbInput = nullptr; -+ this->yuvOutput = nullptr; - - this->openedFile = 0; - this->closedFile = 1; -@@ -115,7 +93,7 @@ - this->FrameRate = 25; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriterInternal::~vtkFFMPEGWriterInternal() - { - if (!this->closedFile) -@@ -124,41 +102,316 @@ - } - } - --//--------------------------------------------------------------------------- -+// for newer versions of ffmpeg use the new API as the old has been deprecated -+#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 -+ -+//------------------------------------------------------------------------------ - int vtkFFMPEGWriterInternal::Start() - { - this->closedFile = 0; - -- //initialize libavcodec, and register all codecs and formats -+#ifdef NDEBUG -+ av_log_set_level(AV_LOG_ERROR); -+#endif -+ -+ // choose avi media file format -+ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); -+ if (!this->avOutputFormat) -+ { -+ vtkGenericWarningMacro(<< "Could not open the avi media file format."); -+ return 0; -+ } -+ -+ enum AVCodecID video_codec = this->Writer->GetCompression() -+ ? AV_CODEC_ID_MJPEG // choose a codec that is easily playable on windows -+ : AV_CODEC_ID_RAWVIDEO; -+ -+ // create the format context that wraps all of the media output structures -+ if (avformat_alloc_output_context2( -+ &this->avFormatContext, this->avOutputFormat, nullptr, this->Writer->GetFileName()) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open the format context."); -+ return 0; -+ } -+ -+ vtk_ff_const59 AVCodec* codec; -+ if (!(codec = avcodec_find_encoder(video_codec))) -+ { -+ vtkGenericWarningMacro(<< "Failed to get video codec."); -+ return 0; -+ } -+ -+ // create a stream for that file -+ this->avStream = avformat_new_stream(this->avFormatContext, codec); -+ if (!this->avStream) -+ { -+ vtkGenericWarningMacro(<< "Could not create video stream."); -+ return 0; -+ } -+ -+ // Set up the codec. -+ if (!(this->avCodecContext = avcodec_alloc_context3(codec))) -+ { -+ vtkGenericWarningMacro(<< "Failed to allocate codec context."); -+ return 0; -+ } -+ -+ this->avStream->codecpar->codec_id = video_codec; -+ this->avStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; -+ this->avStream->codecpar->width = this->Dim[0]; -+ this->avStream->codecpar->height = this->Dim[1]; -+ if (this->Writer->GetCompression()) -+ { -+ this->avStream->codecpar->format = AV_PIX_FMT_YUVJ420P; -+ } -+ else -+ { -+ this->avStream->codecpar->format = AV_PIX_FMT_BGR24; -+ } -+ this->avStream->time_base.den = this->FrameRate; -+ this->avStream->time_base.num = 1; -+ -+ if (!this->Writer->GetBitRate()) -+ { -+ // allow a variable quality/size tradeoff -+ switch (this->Writer->GetQuality()) -+ { -+ case 0: -+ this->avStream->codecpar->bit_rate = 3 * 1024 * 1024; -+ break; -+ case 1: -+ this->avStream->codecpar->bit_rate = 6 * 1024 * 1024; -+ break; -+ default: -+ this->avStream->codecpar->bit_rate = 12 * 1024 * 1024; -+ break; -+ } -+ } -+ else -+ { -+ this->avStream->codecpar->bit_rate = this->Writer->GetBitRate(); -+ } -+ -+ // to do playback at actual recorded rate, this will need more work see also below -+ avcodec_parameters_to_context(this->avCodecContext, this->avStream->codecpar); -+ this->avCodecContext->time_base.den = this->FrameRate; -+ this->avCodecContext->time_base.num = 1; -+ // this->avCodecContext->max_b_frames = 2; -+ // about one full frame per second -+ this->avCodecContext->gop_size = this->FrameRate; -+ if (this->avFormatContext->oformat->flags & AVFMT_GLOBALHEADER) -+ { -+ this->avCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+ } -+ if (!this->Writer->GetBitRateTolerance()) -+ { -+ this->avCodecContext->bit_rate_tolerance = -+ this->avCodecContext->bit_rate; // ffmpeg won't create a codec if brt
avCodecContext->bit_rate_tolerance = this->Writer->GetBitRateTolerance(); -+ } -+ avcodec_parameters_from_context(this->avStream->codecpar, this->avCodecContext); -+ -+ if (avcodec_open2(this->avCodecContext, codec, nullptr) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open codec."); -+ return 0; -+ } -+ -+ // for the output of the writer's input... -+ this->rgbInput = av_frame_alloc(); -+ if (!this->rgbInput) -+ { -+ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); -+ return 0; -+ } -+ this->rgbInput->format = AV_PIX_FMT_RGB24; -+ this->rgbInput->width = this->avCodecContext->width; -+ this->rgbInput->height = this->avCodecContext->height; -+ av_frame_get_buffer(this->rgbInput, 1); -+ -+ // and for the output to the codec's input. -+ this->yuvOutput = av_frame_alloc(); -+ if (!this->yuvOutput) -+ { -+ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); -+ return 0; -+ } -+ this->yuvOutput->format = this->avCodecContext->pix_fmt; -+ this->yuvOutput->width = this->avCodecContext->width; -+ this->yuvOutput->height = this->avCodecContext->height; -+ this->yuvOutput->pts = 0; -+ av_frame_get_buffer(this->yuvOutput, 1); -+ -+ // Finally, open the file and start it off. -+ if (!(this->avOutputFormat->flags & AVFMT_NOFILE)) -+ { -+ if (avio_open(&this->avFormatContext->pb, this->Writer->GetFileName(), AVIO_FLAG_WRITE) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); -+ return 0; -+ } -+ } -+ this->openedFile = 1; -+ -+ if (avformat_write_header(this->avFormatContext, nullptr) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); -+ return 0; -+ } -+ return 1; -+} -+ -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Write(vtkImageData* id) -+{ -+ this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); -+ -+ // copy the image from the input to the RGB buffer while flipping Y -+ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); -+ unsigned char* src; -+ for (int y = 0; y < this->avCodecContext->height; y++) -+ { -+ src = rgb + (this->avCodecContext->height - y - 1) * this->avCodecContext->width * 3; // flip Y -+ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; -+ memcpy((void*)dest, (void*)src, this->avCodecContext->width * 3); -+ } -+ -+ // convert that to YUV for input to the codec -+ SwsContext* convert_ctx = -+ sws_getContext(this->avCodecContext->width, this->avCodecContext->height, AV_PIX_FMT_RGB24, -+ this->avCodecContext->width, this->avCodecContext->height, this->avCodecContext->pix_fmt, -+ SWS_BICUBIC, nullptr, nullptr, nullptr); -+ -+ if (convert_ctx == nullptr) -+ { -+ vtkGenericWarningMacro(<< "swscale context initialization failed"); -+ return 0; -+ } -+ -+ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, -+ this->avCodecContext->height, this->yuvOutput->data, this->yuvOutput->linesize); -+ -+ sws_freeContext(convert_ctx); -+ -+ if (!result) -+ { -+ vtkGenericWarningMacro(<< "sws_scale() failed"); -+ return 0; -+ } -+ -+ int ret = avcodec_send_frame(this->avCodecContext, this->yuvOutput); -+ this->yuvOutput->pts++; -+ -+ if (ret < 0) -+ { -+ return 1; -+ } -+ -+ // run the encoder -+ AVPacket pkt; -+ av_init_packet(&pkt); -+ pkt.data = nullptr; -+ pkt.size = 0; -+ -+ while (!ret) -+ { -+ // dump the compressed result to file -+ ret = avcodec_receive_packet(this->avCodecContext, &pkt); -+ if (!ret) -+ { -+ pkt.stream_index = this->avStream->index; -+ int wret = av_write_frame(this->avFormatContext, &pkt); -+ if (wret < 0) -+ { -+ vtkGenericWarningMacro(<< "Problem encoding frame."); -+ return 0; -+ } -+ } -+ } -+ -+ return 1; -+} -+ -+//------------------------------------------------------------------------------ -+void vtkFFMPEGWriterInternal::End() -+{ -+ if (this->yuvOutput) -+ { -+ av_frame_free(&this->yuvOutput); -+ this->yuvOutput = nullptr; -+ } -+ -+ if (this->rgbInput) -+ { -+ av_frame_free(&this->rgbInput); -+ this->rgbInput = nullptr; -+ } -+ -+ if (this->avFormatContext) -+ { -+ if (this->openedFile) -+ { -+ av_write_trailer(this->avFormatContext); -+ avio_close(this->avFormatContext->pb); -+ this->openedFile = 0; -+ } -+ -+ avformat_free_context(this->avFormatContext); -+ this->avFormatContext = nullptr; -+ } -+ -+ if (this->avOutputFormat) -+ { -+ // Next line was done inside av_free(this->avFormatContext). -+ // av_free(this->avOutputFormat); -+ -+ this->avOutputFormat = nullptr; -+ } -+ -+ if (this->avCodecContext) -+ { -+ avcodec_close(this->avCodecContext); -+ avcodec_free_context(&this->avCodecContext); -+ this->avCodecContext = nullptr; -+ } -+ -+ this->closedFile = 1; -+} -+ -+// for old versions of ffmpeg use the old API, eventually remove this code -+// The new API was introduced around 2016 -+#else -+ -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Start() -+{ -+ this->closedFile = 0; -+ -+ // initialize libavcodec, and register all codecs and formats - av_register_all(); - -- //create the format context that wraps all of the media output structures --#if LIBAVFORMAT_VERSION_MAJOR >= 52 -+ // create the format context that wraps all of the media output structures - this->avFormatContext = avformat_alloc_context(); --#else -- this->avFormatContext = av_alloc_format_context(); --#endif - if (!this->avFormatContext) - { -- vtkGenericWarningMacro (<< "Coult not open the format context."); -+ vtkGenericWarningMacro(<< "Could not open the format context."); - return 0; - } - -- //choose avi media file format --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- this->avOutputFormat = guess_format("avi", NULL, NULL); --#else -- this->avOutputFormat = av_guess_format("avi", NULL, NULL); --#endif -+ // choose avi media file format -+ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); - if (!this->avOutputFormat) - { -- vtkGenericWarningMacro (<< "Could not open the avi media file format."); -+ vtkGenericWarningMacro(<< "Could not open the avi media file format."); - return 0; - } - - if (this->Writer->GetCompression()) - { -- //choose a codec that is easily playable on windows -+ // choose a codec that is easily playable on windows - this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; - } - else -@@ -166,36 +419,24 @@ - this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; - } - -- //assign the format to the context -+ // assign the format to the context - this->avFormatContext->oformat = this->avOutputFormat; - -- //choose a filename for the output -+ // choose a filename for the output - strcpy(this->avFormatContext->filename, this->Writer->GetFileName()); - -- //create a stream for that file --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- this->avStream = av_new_stream(this->avFormatContext, 0); --#else -+ // create a stream for that file - this->avStream = avformat_new_stream(this->avFormatContext, 0); --#endif - if (!this->avStream) - { -- vtkGenericWarningMacro (<< "Could not create video stream."); -+ vtkGenericWarningMacro(<< "Could not create video stream."); - return 0; - } - -- //Set up the codec. -- AVCodecContext *c = this->avStream->codec; --#ifdef VTK_FFMPEG_AVCODECID -+ // Set up the codec. -+ AVCodecContext* c = this->avStream->codec; - c->codec_id = static_cast(this->avOutputFormat->video_codec); --#else -- c->codec_id = static_cast(this->avOutputFormat->video_codec); --#endif --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- c->codec_type = CODEC_TYPE_VIDEO; --#else -- c->codec_type = AVMEDIA_TYPE_VIDEO; --#endif -+ c->codec_type = AVMEDIA_TYPE_VIDEO; - c->width = this->Dim[0]; - c->height = this->Dim[1]; - if (this->Writer->GetCompression()) -@@ -207,25 +448,25 @@ - c->pix_fmt = AV_PIX_FMT_BGR24; - } - -- //to do playback at actual recorded rate, this will need more work see also below -+ // to do playback at actual recorded rate, this will need more work see also below - c->time_base.den = this->FrameRate; - c->time_base.num = 1; -- //about one full frame per second -+ // about one full frame per second - c->gop_size = this->FrameRate; - -- if( !this->Writer->GetBitRate() ) -+ if (!this->Writer->GetBitRate()) - { -- //allow a variable quality/size tradeoff -+ // allow a variable quality/size tradeoff - switch (this->Writer->GetQuality()) - { - case 0: -- c->bit_rate = 3*1024*1024; -+ c->bit_rate = 3 * 1024 * 1024; - break; - case 1: -- c->bit_rate = 6*1024*1024; -+ c->bit_rate = 6 * 1024 * 1024; - break; - default: -- c->bit_rate = 12*1024*1024; -+ c->bit_rate = 12 * 1024 * 1024; - break; - } - } -@@ -234,262 +475,164 @@ - c->bit_rate = this->Writer->GetBitRate(); - } - -- if(!this->Writer->GetBitRateTolerance()) -+ if (!this->Writer->GetBitRateTolerance()) - { -- c->bit_rate_tolerance = c->bit_rate; //ffmpeg won't create a codec if brt
bit_rate_tolerance = c->bit_rate; // ffmpeg won't create a codec if brt
bit_rate_tolerance = this->Writer->GetBitRateTolerance(); - } - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- //apply the chosen parameters -- if (av_set_parameters(this->avFormatContext, NULL) < 0) -- { -- vtkGenericWarningMacro (<< "Invalid output format parameters." ); -- return 0; -- } --#endif -- -- //manufacture a codec with the chosen parameters -- AVCodec *codec = avcodec_find_encoder(c->codec_id); -+ // manufacture a codec with the chosen parameters -+ AVCodec* codec = avcodec_find_encoder(c->codec_id); - if (!codec) - { -- vtkGenericWarningMacro (<< "Codec not found." ); -- return 0; -- } --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (avcodec_open(c, codec) < 0) --#else -- if (avcodec_open2(c, codec, NULL) < 0) --#endif -- { -- vtkGenericWarningMacro (<< "Could not open codec."); -+ vtkGenericWarningMacro(<< "Codec not found."); - return 0; - } -- -- //create buffers for the codec to work with. -- --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- //working compression space -- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough -- this->codecBuf = new unsigned char[this->codecBufSize]; -- if (!this->codecBuf) -+ if (avcodec_open2(c, codec, nullptr) < 0) - { -- vtkGenericWarningMacro (<< "Could not make codec working space." ); -+ vtkGenericWarningMacro(<< "Could not open codec."); - return 0; - } --#endif - -- //for the output of the writer's input... -+ // for the output of the writer's input... - this->rgbInput = av_frame_alloc(); - if (!this->rgbInput) - { -- vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); -+ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); - return 0; - } - int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); -- unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); -+ unsigned char* rgb = (unsigned char*)av_malloc(sizeof(unsigned char) * RGBsize); - if (!rgb) - { -- vtkGenericWarningMacro (<< "Could not make rgbInput's buffer." ); -+ vtkGenericWarningMacro(<< "Could not make rgbInput's buffer."); - return 0; - } -- //The rgb buffer should get deleted when this->rgbInput is. -- avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); -+ // The rgb buffer should get deleted when this->rgbInput is. -+ avpicture_fill((AVPicture*)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); - -- //and for the output to the codec's input. -+ // and for the output to the codec's input. - this->yuvOutput = av_frame_alloc(); - if (!this->yuvOutput) - { -- vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); -+ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); - return 0; - } - int YUVsize = avpicture_get_size(c->pix_fmt, c->width, c->height); -- unsigned char *yuv = (unsigned char *)av_malloc(sizeof(unsigned char) * YUVsize); -+ unsigned char* yuv = (unsigned char*)av_malloc(sizeof(unsigned char) * YUVsize); - if (!yuv) - { -- vtkGenericWarningMacro (<< "Could not make yuvOutput's buffer." ); -+ vtkGenericWarningMacro(<< "Could not make yuvOutput's buffer."); - return 0; - } -- //The yuv buffer should get deleted when this->yuv_input is. -- avpicture_fill((AVPicture *)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); -- -+ // The yuv buffer should get deleted when this->yuv_input is. -+ avpicture_fill((AVPicture*)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); - -- //Finally, open the file and start it off. --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0) --#else -+ // Finally, open the file and start it off. - if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0) --#endif - { -- vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." ); -+ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); - return 0; - } - this->openedFile = 1; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- av_write_header(this->avFormatContext); --#else -- if (avformat_write_header(this->avFormatContext, NULL) < 0) -+ if (avformat_write_header(this->avFormatContext, nullptr) < 0) - { -- vtkGenericWarningMacro (<< "Could not allocate avcodec private data."); -+ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); - return 0; - } --#endif - return 1; - } - --//--------------------------------------------------------------------------- --int vtkFFMPEGWriterInternal::Write(vtkImageData *id) -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Write(vtkImageData* id) - { - this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); - -- AVCodecContext *cc = this->avStream->codec; -+ AVCodecContext* cc = this->avStream->codec; - -- //copy the image from the input to the RGB buffer while flipping Y -- unsigned char *rgb = (unsigned char*)id->GetScalarPointer(); -- unsigned char *src; -+ // copy the image from the input to the RGB buffer while flipping Y -+ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); -+ unsigned char* src; - for (int y = 0; y < cc->height; y++) - { -- src = rgb + (cc->height-y-1) * cc->width * 3; //flip Y -- unsigned char *dest = -- &this->rgbInput->data[0][y*this->rgbInput->linesize[0]]; -- memcpy((void*)dest, (void*)src, cc->width*3); -+ src = rgb + (cc->height - y - 1) * cc->width * 3; // flip Y -+ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; -+ memcpy((void*)dest, (void*)src, cc->width * 3); - } - -- //convert that to YUV for input to the codec --#ifdef VTK_FFMPEG_HAS_IMG_CONVERT -- img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, -- (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, -- cc->width, cc->height); --#else -- //convert that to YUV for input to the codec -- SwsContext* convert_ctx = sws_getContext( -- cc->width, cc->height, AV_PIX_FMT_RGB24, -- cc->width, cc->height, cc->pix_fmt, -- SWS_BICUBIC, NULL, NULL, NULL); -+ // convert that to YUV for input to the codec -+ SwsContext* convert_ctx = sws_getContext(cc->width, cc->height, AV_PIX_FMT_RGB24, cc->width, -+ cc->height, cc->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr); - -- if(convert_ctx == NULL) -+ if (convert_ctx == nullptr) - { - vtkGenericWarningMacro(<< "swscale context initialization failed"); - return 0; - } - -- int result = sws_scale(convert_ctx, -- this->rgbInput->data, this->rgbInput->linesize, -- 0, cc->height, -- this->yuvOutput->data, this->yuvOutput->linesize -- ); -+ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, cc->height, -+ this->yuvOutput->data, this->yuvOutput->linesize); - - sws_freeContext(convert_ctx); - -- if(!result) -+ if (!result) - { - vtkGenericWarningMacro(<< "sws_scale() failed"); - return 0; - } --#endif - -- //run the encoder -+ // run the encoder - AVPacket pkt; - av_init_packet(&pkt); -- pkt.data = NULL; -+ pkt.data = nullptr; - pkt.size = 0; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- int toAdd = avcodec_encode_video(cc, -- this->codecBuf, -- this->codecBufSize, -- this->yuvOutput); -- if (toAdd) -- { -- //to do playback at actual recorded rate, this will need more work -- pkt.pts = cc->coded_frame->pts; -- //pkt.dts = ?; not dure what decompression time stamp should be -- pkt.data = this->codecBuf; -- pkt.size = toAdd; -- pkt.stream_index = this->avStream->index; -- if (cc->coded_frame->key_frame) //treat keyframes well -- { --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- pkt.flags |= PKT_FLAG_KEY; --#else -- pkt.flags |= AV_PKT_FLAG_KEY; --#endif -- } -- pkt.duration = 0; //presentation duration in time_base units or 0 if NA -- pkt.pos = -1; //byte position in stream or -1 if NA -- -- toAdd = av_write_frame(this->avFormatContext, &pkt); -- } -- if (toAdd) //should not have anything left over -- { -- vtkGenericWarningMacro (<< "Problem encoding frame." ); -- return 0; -- } -- --#else - int got_frame; -- int ret = avcodec_encode_video2(cc, -- &pkt, -- this->yuvOutput, -- &got_frame); -+ int ret = avcodec_encode_video2(cc, &pkt, this->yuvOutput, &got_frame); - -- //dump the compressed result to file -+ // dump the compressed result to file - if (got_frame) - { - pkt.stream_index = this->avStream->index; - ret = av_write_frame(this->avFormatContext, &pkt); - } - -- if (ret<0) -+ if (ret < 0) - { -- vtkGenericWarningMacro (<< "Problem encoding frame." ); -+ vtkGenericWarningMacro(<< "Problem encoding frame."); - return 0; - } --#endif - - return 1; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriterInternal::End() - { - if (this->yuvOutput) - { - av_free(this->yuvOutput->data[0]); - av_free(this->yuvOutput); -- this->yuvOutput = NULL; -+ this->yuvOutput = nullptr; - } - - if (this->rgbInput) - { - av_free(this->rgbInput->data[0]); - av_free(this->rgbInput); -- this->rgbInput = NULL; -+ this->rgbInput = nullptr; - } - -- --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (this->codecBuf) -- { -- av_free(this->codecBuf); -- this->codecBuf = NULL; -- } --#endif -- - if (this->avFormatContext) - { - if (this->openedFile) - { - av_write_trailer(this->avFormatContext); --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- url_fclose(this->avFormatContext->pb); --#else - avio_close(this->avFormatContext->pb); --#endif - this->openedFile = 0; - } - -@@ -500,13 +643,13 @@ - if (this->avStream) - { - av_free(this->avStream); -- this->avStream = NULL; -+ this->avStream = nullptr; - } - - if (this->avOutputFormat) - { -- //Next line was done inside av_free(this->avFormatContext). -- //av_free(this->avOutputFormat); -+ // Next line was done inside av_free(this->avFormatContext). -+ // av_free(this->avOutputFormat); - - this->avOutputFormat = 0; - } -@@ -514,14 +657,15 @@ - this->closedFile = 1; - } - -+#endif - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkStandardNewMacro(vtkFFMPEGWriter); - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriter::vtkFFMPEGWriter() - { -- this->Internals = 0; -+ this->Internals = nullptr; - this->Quality = 2; - this->Compression = true; - this->Rate = 25; -@@ -529,24 +673,24 @@ - this->BitRateTolerance = 0; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriter::~vtkFFMPEGWriter() - { - delete this->Internals; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::Start() - { - this->Error = 1; - -- if ( this->Internals ) -+ if (this->Internals) - { - vtkErrorMacro("Movie already started."); - this->SetErrorCode(vtkGenericMovieWriter::InitError); - return; - } -- if ( this->GetInput() == NULL ) -+ if (this->GetInput() == nullptr) - { - vtkErrorMacro("Please specify an input."); - this->SetErrorCode(vtkGenericMovieWriter::NoInputError); -@@ -566,7 +710,7 @@ - this->Initialized = 0; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::Write() - { - if (this->Error) -@@ -574,7 +718,7 @@ - return; - } - -- if ( !this->Internals ) -+ if (!this->Internals) - { - vtkErrorMacro("Movie not started."); - this->Error = 1; -@@ -588,13 +732,13 @@ - - int dim[4]; - input->GetDimensions(dim); -- if ( this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0 ) -+ if (this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0) - { - this->Internals->Dim[0] = dim[0]; - this->Internals->Dim[1] = dim[1]; - } - -- if (this->Internals->Dim[0]!= dim[0] || this->Internals->Dim[1]!= dim[1]) -+ if (this->Internals->Dim[0] != dim[0] || this->Internals->Dim[1] != dim[1]) - { - vtkErrorMacro("Image not of the same size."); - this->Error = 1; -@@ -602,7 +746,7 @@ - return; - } - -- if ( !this->Initialized ) -+ if (!this->Initialized) - { - this->Internals->FrameRate = this->Rate; - if (!this->Internals->Start()) -@@ -623,21 +767,21 @@ - } - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::End() - { - this->Internals->End(); - - delete this->Internals; -- this->Internals = 0; -+ this->Internals = nullptr; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::PrintSelf(ostream& os, vtkIndent indent) - { - this->Superclass::PrintSelf(os, indent); - os << indent << "Quality: " << this->Quality << endl; -- os << indent << "Compression: " << (this->Compression?"true":"false") << endl; -+ os << indent << "Compression: " << (this->Compression ? "true" : "false") << endl; - os << indent << "Rate: " << this->Rate << endl; - os << indent << "BitRate: " << this->BitRate << endl; - os << indent << "BitRateTolerance: " << this->BitRateTolerance << endl; diff --git a/infra/conda/vtk/7.1.1/py310/LICENSE.txt b/infra/conda/vtk/7.1/LICENSE.txt similarity index 100% rename from infra/conda/vtk/7.1.1/py310/LICENSE.txt rename to infra/conda/vtk/7.1/LICENSE.txt diff --git a/infra/conda/vtk/7.1/build-package.sh b/infra/conda/vtk/7.1/build-package.sh new file mode 100755 index 00000000..99b69046 --- /dev/null +++ b/infra/conda/vtk/7.1/build-package.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash +set -xeo pipefail + +# Show usage +usage() { + echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' + echo 'Example:' + echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' + echo "$(basename "$0")"' --variant=linux_64_python3.10_cpython --parallel=4' + exit 1 +} + +# Parse args +variant= +parallel= + +for option; do + case $option in + --variant=*) + variant=$(expr "x$option" : "x--variant=\(.*\)") + ;; + --parallel=*) + parallel=$(expr "x$option" : "x--parallel=\(.*\)") + ;; + *) + echo "Unknown option: $option" 1>&2 + exit 1 + ;; + esac +done + +if [ -z "${variant}" ]; then usage; fi + +# Configure environment +export FEEDSTOCK_ROOT="$(pwd)" +export RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" +export CONFIG_FILE="${FEEDSTOCK_ROOT}/variants/${variant}.yaml" +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +export CPU_COUNT="${parallel:-$(nproc)}" + +export PYTHONUNBUFFERED=1 + +# Configure conda build path +mkdir -p "${CONDA_BLD_PATH}" + +cat >~/.condarc <"${CONDA_PREFIX}"/etc/conda/activate.d/conda-forge-ci-setup-activate.sh < Date: Wed, 17 Apr 2024 16:50:26 +0000 Subject: [PATCH 29/53] #42 add vtk build variants --- infra/conda/vtk/7.1/recipe/build.sh | 3 +- .../variants/linux_64_python3.10_cpython.yaml | 82 +++++++++---------- .../variants/linux_64_python3.11_cpython.yaml | 82 +++++++++---------- .../variants/linux_64_python3.12_cpython.yaml | 60 ++++++++++++++ .../variants/linux_64_python3.8_cpython.yaml | 60 ++++++++++++++ .../variants/linux_64_python3.9_cpython.yaml | 60 ++++++++++++++ 6 files changed, 259 insertions(+), 88 deletions(-) create mode 100644 infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml create mode 100644 infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml create mode 100644 infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml diff --git a/infra/conda/vtk/7.1/recipe/build.sh b/infra/conda/vtk/7.1/recipe/build.sh index e2f8de66..47b20111 100755 --- a/infra/conda/vtk/7.1/recipe/build.sh +++ b/infra/conda/vtk/7.1/recipe/build.sh @@ -1,5 +1,4 @@ #!/bin/bash - set -ex BUILD_CONFIG=Release @@ -41,7 +40,7 @@ cmake .. \ -DVTK_Group_MPI=ON \ -DMPIEXEC="${PREFIX}/bin/mpiexec" -make -j${CPU_COUNT} +make -j ${CPU_COUNT} make install # The egg-info file is necessary because some packages, diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml index fe09c1bb..b593d055 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml @@ -1,64 +1,60 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: + - "2" fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' -expat: -- '2' + - "11" freetype: -- '2' + - "2" hdf5: -- '>=1.10,<1.11' -jsoncpp: -- '1.9' + - ">=1.10,<1.14" jpeg: -- '9' + - "9" +jsoncpp: + - "1.9" libpng: -- '1.6' + - "1.6" libtiff: -- '4' + - "4" libxml2: -- '2' + - "2" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.17' + - ">=3.8,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.10.* *_cpython sundials: -- '>=3.0,<6.0' -vtk: -- 7.1.1 + - ">=3.0,<6.0" +target_platform: + - linux-64 xercesc: -- '>=3' + - ">=3" +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version zlib: -- '1' + - "1" diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml index dfd5c1d3..7b6746c6 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml @@ -1,64 +1,60 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: + - "2" fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' -expat: -- '2' + - "11" freetype: -- '2' + - "2" hdf5: -- '>=1.10,<1.13' -jsoncpp: -- '1.9' + - ">=1.10,<1.14" jpeg: -- '9' + - "9" +jsoncpp: + - "1.9" libpng: -- '1.6' + - "1.6" libtiff: -- '4' + - "4" libxml2: -- '2' + - "2" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.18' + - ">=3.8,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.11.* *_cpython sundials: -- '>=3.0,<6.0' -vtk: -- 7.1.1 + - ">=3.0,<6.0" +target_platform: + - linux-64 xercesc: -- '>=3' + - ">=3" +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version zlib: -- '1' + - "1" diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml new file mode 100644 index 00000000..dd80fc05 --- /dev/null +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml @@ -0,0 +1,60 @@ +boostcpp: + - ">=1.68,<1.76" +cdt_name: + - cos7 +channel_sources: + - pychaste + - conda-forge +channel_targets: + - pychaste main +cxx_compiler: + - gxx +cxx_compiler_version: + - "11" +docker_image: + - quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: + - "2" +fortran_compiler: + - gfortran +fortran_compiler_version: + - "11" +freetype: + - "2" +hdf5: + - ">=1.10,<1.14" +jpeg: + - "9" +jsoncpp: + - "1.9" +libpng: + - "1.6" +libtiff: + - "4" +libxml2: + - "2" +metis: + - ">=4" +mpich: + - ">=3" +parmetis: + - ">=4" +petsc: + - ">=3.8,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.12.* *_cpython +sundials: + - ">=3.0,<6.0" +target_platform: + - linux-64 +xercesc: + - ">=3" +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version +zlib: + - "1" diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml new file mode 100644 index 00000000..796cb5f8 --- /dev/null +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml @@ -0,0 +1,60 @@ +boostcpp: + - ">=1.68,<1.76" +cdt_name: + - cos7 +channel_sources: + - pychaste + - conda-forge +channel_targets: + - pychaste main +cxx_compiler: + - gxx +cxx_compiler_version: + - "11" +docker_image: + - quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: + - "2" +fortran_compiler: + - gfortran +fortran_compiler_version: + - "11" +freetype: + - "2" +hdf5: + - ">=1.10,<1.14" +jpeg: + - "9" +jsoncpp: + - "1.9" +libpng: + - "1.6" +libtiff: + - "4" +libxml2: + - "2" +metis: + - ">=4" +mpich: + - ">=3" +parmetis: + - ">=4" +petsc: + - ">=3.8,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.8.* *_cpython +sundials: + - ">=3.0,<6.0" +target_platform: + - linux-64 +xercesc: + - ">=3" +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version +zlib: + - "1" diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml new file mode 100644 index 00000000..400edaa1 --- /dev/null +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml @@ -0,0 +1,60 @@ +boostcpp: + - ">=1.68,<1.76" +cdt_name: + - cos7 +channel_sources: + - pychaste + - conda-forge +channel_targets: + - pychaste main +cxx_compiler: + - gxx +cxx_compiler_version: + - "11" +docker_image: + - quay.io/condaforge/linux-anvil-cos7-x86_64 +expat: + - "2" +fortran_compiler: + - gfortran +fortran_compiler_version: + - "11" +freetype: + - "2" +hdf5: + - ">=1.10,<1.14" +jpeg: + - "9" +jsoncpp: + - "1.9" +libpng: + - "1.6" +libtiff: + - "4" +libxml2: + - "2" +metis: + - ">=4" +mpich: + - ">=3" +parmetis: + - ">=4" +petsc: + - ">=3.8,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.9.* *_cpython +sundials: + - ">=3.0,<6.0" +target_platform: + - linux-64 +xercesc: + - ">=3" +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version +zlib: + - "1" From 78d19995bf4c8e85f02fde02eb5aea02f140364c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 18:24:36 +0000 Subject: [PATCH 30/53] #42 update vtk conda recipe --- infra/conda/vtk/7.1/build-package.sh | 2 +- infra/conda/vtk/7.1/recipe/build.sh | 17 ++++--- infra/conda/vtk/7.1/recipe/meta.yaml | 46 +++++++++---------- .../variants/linux_64_python3.10_cpython.yaml | 4 +- .../variants/linux_64_python3.11_cpython.yaml | 4 +- .../variants/linux_64_python3.12_cpython.yaml | 4 +- .../variants/linux_64_python3.8_cpython.yaml | 4 +- .../variants/linux_64_python3.9_cpython.yaml | 4 +- 8 files changed, 46 insertions(+), 39 deletions(-) diff --git a/infra/conda/vtk/7.1/build-package.sh b/infra/conda/vtk/7.1/build-package.sh index 99b69046..a7747cec 100755 --- a/infra/conda/vtk/7.1/build-package.sh +++ b/infra/conda/vtk/7.1/build-package.sh @@ -6,7 +6,7 @@ usage() { echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' echo 'Example:' echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' - echo "$(basename "$0")"' --variant=linux_64_python3.10_cpython --parallel=4' + echo "$(basename "$0")"' --variant=linux_64_python3.8_cpython --parallel=4' exit 1 } diff --git a/infra/conda/vtk/7.1/recipe/build.sh b/infra/conda/vtk/7.1/recipe/build.sh index 47b20111..0241183a 100755 --- a/infra/conda/vtk/7.1/recipe/build.sh +++ b/infra/conda/vtk/7.1/recipe/build.sh @@ -1,17 +1,15 @@ #!/bin/bash set -ex -BUILD_CONFIG=Release - mkdir build cd build || exit export CFLAGS="${CFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" export CXXFLAGS="${CXXFLAGS} -isystem ${PREFIX}/lib/python${PY_VER}/site-packages/mpi4py/include" -cmake .. \ +cmake \ -Wno-dev \ - -DCMAKE_BUILD_TYPE=$BUILD_CONFIG \ + -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_PREFIX_PATH:PATH="${PREFIX}" \ -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ -DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \ @@ -24,8 +22,8 @@ cmake .. \ -DVTK_PYTHON_VERSION:STRING="${PY_VER}" \ -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="${SP_DIR}" \ -DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF \ - -DVTK_RENDERING_BACKEND=OpenGL2 \ - -DModule_vtkRenderingMatplotlib=ON \ + -DVTK_RENDERING_BACKEND:STRING=OpenGL2 \ + -DModule_vtkRenderingMatplotlib:BOOL=ON \ -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \ -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \ -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \ @@ -36,9 +34,10 @@ cmake .. \ -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ -DVTK_USE_SYSTEM_JSONCPP:BOOL=ON \ -DVTK_USE_X:BOOL=ON \ - -DVTK_USE_CXX11_FEATURES=ON \ - -DVTK_Group_MPI=ON \ - -DMPIEXEC="${PREFIX}/bin/mpiexec" + -DVTK_USE_CXX11_FEATURES:BOOL=ON \ + -DVTK_Group_MPI:BOOL=ON \ + -DMPIEXEC="${PREFIX}/bin/mpiexec" \ + .. make -j ${CPU_COUNT} make install diff --git a/infra/conda/vtk/7.1/recipe/meta.yaml b/infra/conda/vtk/7.1/recipe/meta.yaml index 71db8717..d76b015e 100755 --- a/infra/conda/vtk/7.1/recipe/meta.yaml +++ b/infra/conda/vtk/7.1/recipe/meta.yaml @@ -1,8 +1,7 @@ {% set version = "7.1.1" %} -{% set build = 0 %} - {% set minor_version = ".".join(version.split(".")[:2]) %} +{% set build = 0 %} {% set build_string = "py{}h{}_{}".format(CONDA_PY, PKG_HASH, build) %} package: @@ -11,7 +10,6 @@ package: source: url: http://www.vtk.org/files/release/{{ minor_version }}/VTK-{{ version }}.tar.gz - fn: VTK-{{ version }}.tar.gz sha256: 2d5cdd048540144d821715c718932591418bb48f5b6bb19becdae62339efa75a patches: - patches/vtk7.1.1.patch @@ -50,53 +48,53 @@ requirements: - {{ cdt('mesa-libgbm') }} host: - - python - - zlib - - freetype - - libxml2 - - libpng - - jpeg - - libtiff - - jsoncpp + - boost-cpp - expat + - freetype - glew - - boost-cpp - hdf5 - hdf5 * mpi_mpich* + - jpeg + - jsoncpp + - libpng + - libtiff + - libxml2 - metis - mpich - mpi4py - parmetis - petsc - petsc4py + - python - sundials - xerces-c - - xsd 4.* + - xsd + - zlib run: - - python - - future - - zlib - - freetype - - libxml2 - - libpng - - jpeg - - libtiff - - jsoncpp + - boost-cpp - expat + - freetype + - future - glew - - boost-cpp - hdf5 - hdf5 * mpi_mpich* + - jpeg + - jsoncpp + - libpng + - libtiff + - libxml2 - metis - mpich - mpi4py - parmetis - petsc - petsc4py + - python - sundials - xerces-c - - xsd 4.* + - xsd + - zlib test: imports: diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml index b593d055..11e0d342 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml @@ -52,7 +52,9 @@ sundials: target_platform: - linux-64 xercesc: - - ">=3" + - "3" +xsd: + - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml index 7b6746c6..5f9561dd 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml @@ -52,7 +52,9 @@ sundials: target_platform: - linux-64 xercesc: - - ">=3" + - "3" +xsd: + - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml index dd80fc05..329460a6 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml @@ -52,7 +52,9 @@ sundials: target_platform: - linux-64 xercesc: - - ">=3" + - "3" +xsd: + - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml index 796cb5f8..434d78dc 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml @@ -52,7 +52,9 @@ sundials: target_platform: - linux-64 xercesc: - - ">=3" + - "3" +xsd: + - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml index 400edaa1..c34658f9 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml @@ -52,7 +52,9 @@ sundials: target_platform: - linux-64 xercesc: - - ">=3" + - "3" +xsd: + - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version From e0cce1cb050cf7c332dd6311be637ac0d592de34 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 18:25:15 +0000 Subject: [PATCH 31/53] #42 restructure chaste conda scripts --- infra/conda/chaste/2024.1/build-package.sh | 100 ++++++++++++++++++ .../chaste/{py311 => 2024.1}/recipe/build.sh | 19 ++-- .../chaste/{py310 => 2024.1}/recipe/meta.yaml | 3 +- .../recipe/patches/petsc.patch | 0 .../scripts}/build_steps.sh | 0 .../scripts}/run_docker_build.sh | 0 .../linux_64_python3.10_cpython.yaml} | 0 .../linux_64_python3.11_cpython.yaml} | 0 .../linux_64_python3.12_cpython.yaml} | 0 .../variants/linux_64_python3.8_cpython.yaml} | 0 .../variants/linux_64_python3.9_cpython.yaml} | 0 infra/conda/chaste/py310/.gitignore | 3 - infra/conda/chaste/py310/LICENSE.txt | 27 ----- infra/conda/chaste/py310/build.sh | 12 --- infra/conda/chaste/py310/recipe/build.sh | 72 ------------- .../chaste/py310/recipe/patches/vtk.patch | 13 --- .../py310/recipe/recipe-scripts-license.txt | 27 ----- infra/conda/chaste/py311/.gitignore | 3 - .../chaste/py311/.scripts/build_steps.sh | 72 ------------- .../chaste/py311/.scripts/run_docker_build.sh | 35 ------ infra/conda/chaste/py311/LICENSE.txt | 27 ----- infra/conda/chaste/py311/build.sh | 12 --- infra/conda/chaste/py311/recipe/meta.yaml | 80 -------------- .../chaste/py311/recipe/patches/petsc.patch | 13 --- .../chaste/py311/recipe/patches/vtk.patch | 13 --- .../py311/recipe/recipe-scripts-license.txt | 27 ----- infra/conda/chaste/py312/.gitignore | 3 - .../chaste/py312/.scripts/build_steps.sh | 72 ------------- .../chaste/py312/.scripts/run_docker_build.sh | 35 ------ infra/conda/chaste/py312/LICENSE.txt | 27 ----- infra/conda/chaste/py312/build.sh | 12 --- infra/conda/chaste/py312/recipe/build.sh | 72 ------------- infra/conda/chaste/py312/recipe/meta.yaml | 80 -------------- .../chaste/py312/recipe/patches/petsc.patch | 13 --- .../chaste/py312/recipe/patches/vtk.patch | 13 --- .../py312/recipe/recipe-scripts-license.txt | 27 ----- infra/conda/chaste/py38/.gitignore | 3 - .../conda/chaste/py38/.scripts/build_steps.sh | 72 ------------- .../chaste/py38/.scripts/run_docker_build.sh | 35 ------ infra/conda/chaste/py38/LICENSE.txt | 27 ----- infra/conda/chaste/py38/build.sh | 12 --- infra/conda/chaste/py38/recipe/build.sh | 72 ------------- infra/conda/chaste/py38/recipe/meta.yaml | 80 -------------- .../chaste/py38/recipe/patches/petsc.patch | 13 --- .../chaste/py38/recipe/patches/vtk.patch | 13 --- .../py38/recipe/recipe-scripts-license.txt | 27 ----- infra/conda/chaste/py39/.gitignore | 3 - .../conda/chaste/py39/.scripts/build_steps.sh | 72 ------------- .../chaste/py39/.scripts/run_docker_build.sh | 35 ------ infra/conda/chaste/py39/LICENSE.txt | 27 ----- infra/conda/chaste/py39/build.sh | 12 --- infra/conda/chaste/py39/recipe/build.sh | 72 ------------- infra/conda/chaste/py39/recipe/meta.yaml | 80 -------------- .../chaste/py39/recipe/patches/petsc.patch | 13 --- .../chaste/py39/recipe/patches/vtk.patch | 13 --- .../py39/recipe/recipe-scripts-license.txt | 27 ----- 56 files changed, 107 insertions(+), 1513 deletions(-) create mode 100755 infra/conda/chaste/2024.1/build-package.sh rename infra/conda/chaste/{py311 => 2024.1}/recipe/build.sh (86%) rename infra/conda/chaste/{py310 => 2024.1}/recipe/meta.yaml (97%) rename infra/conda/chaste/{py310 => 2024.1}/recipe/patches/petsc.patch (100%) rename infra/conda/chaste/{py310/.scripts => 2024.1/scripts}/build_steps.sh (100%) rename infra/conda/chaste/{py310/.scripts => 2024.1/scripts}/run_docker_build.sh (100%) rename infra/conda/chaste/{py310/.ci_support/linux_64_python3.10.____cpython.yaml => 2024.1/variants/linux_64_python3.10_cpython.yaml} (100%) rename infra/conda/chaste/{py311/.ci_support/linux_64_python3.11.____cpython.yaml => 2024.1/variants/linux_64_python3.11_cpython.yaml} (100%) rename infra/conda/chaste/{py312/.ci_support/linux_64_python3.12.____cpython.yaml => 2024.1/variants/linux_64_python3.12_cpython.yaml} (100%) rename infra/conda/chaste/{py38/.ci_support/linux_64_python3.8.____cpython.yaml => 2024.1/variants/linux_64_python3.8_cpython.yaml} (100%) rename infra/conda/chaste/{py39/.ci_support/linux_64_python3.9.____cpython.yaml => 2024.1/variants/linux_64_python3.9_cpython.yaml} (100%) delete mode 100755 infra/conda/chaste/py310/.gitignore delete mode 100644 infra/conda/chaste/py310/LICENSE.txt delete mode 100755 infra/conda/chaste/py310/build.sh delete mode 100755 infra/conda/chaste/py310/recipe/build.sh delete mode 100644 infra/conda/chaste/py310/recipe/patches/vtk.patch delete mode 100644 infra/conda/chaste/py310/recipe/recipe-scripts-license.txt delete mode 100755 infra/conda/chaste/py311/.gitignore delete mode 100755 infra/conda/chaste/py311/.scripts/build_steps.sh delete mode 100755 infra/conda/chaste/py311/.scripts/run_docker_build.sh delete mode 100644 infra/conda/chaste/py311/LICENSE.txt delete mode 100755 infra/conda/chaste/py311/build.sh delete mode 100644 infra/conda/chaste/py311/recipe/meta.yaml delete mode 100644 infra/conda/chaste/py311/recipe/patches/petsc.patch delete mode 100644 infra/conda/chaste/py311/recipe/patches/vtk.patch delete mode 100644 infra/conda/chaste/py311/recipe/recipe-scripts-license.txt delete mode 100755 infra/conda/chaste/py312/.gitignore delete mode 100755 infra/conda/chaste/py312/.scripts/build_steps.sh delete mode 100755 infra/conda/chaste/py312/.scripts/run_docker_build.sh delete mode 100644 infra/conda/chaste/py312/LICENSE.txt delete mode 100755 infra/conda/chaste/py312/build.sh delete mode 100755 infra/conda/chaste/py312/recipe/build.sh delete mode 100644 infra/conda/chaste/py312/recipe/meta.yaml delete mode 100644 infra/conda/chaste/py312/recipe/patches/petsc.patch delete mode 100644 infra/conda/chaste/py312/recipe/patches/vtk.patch delete mode 100644 infra/conda/chaste/py312/recipe/recipe-scripts-license.txt delete mode 100755 infra/conda/chaste/py38/.gitignore delete mode 100755 infra/conda/chaste/py38/.scripts/build_steps.sh delete mode 100755 infra/conda/chaste/py38/.scripts/run_docker_build.sh delete mode 100644 infra/conda/chaste/py38/LICENSE.txt delete mode 100755 infra/conda/chaste/py38/build.sh delete mode 100755 infra/conda/chaste/py38/recipe/build.sh delete mode 100644 infra/conda/chaste/py38/recipe/meta.yaml delete mode 100644 infra/conda/chaste/py38/recipe/patches/petsc.patch delete mode 100644 infra/conda/chaste/py38/recipe/patches/vtk.patch delete mode 100644 infra/conda/chaste/py38/recipe/recipe-scripts-license.txt delete mode 100755 infra/conda/chaste/py39/.gitignore delete mode 100755 infra/conda/chaste/py39/.scripts/build_steps.sh delete mode 100755 infra/conda/chaste/py39/.scripts/run_docker_build.sh delete mode 100644 infra/conda/chaste/py39/LICENSE.txt delete mode 100755 infra/conda/chaste/py39/build.sh delete mode 100755 infra/conda/chaste/py39/recipe/build.sh delete mode 100644 infra/conda/chaste/py39/recipe/meta.yaml delete mode 100644 infra/conda/chaste/py39/recipe/patches/petsc.patch delete mode 100644 infra/conda/chaste/py39/recipe/patches/vtk.patch delete mode 100644 infra/conda/chaste/py39/recipe/recipe-scripts-license.txt diff --git a/infra/conda/chaste/2024.1/build-package.sh b/infra/conda/chaste/2024.1/build-package.sh new file mode 100755 index 00000000..df68446b --- /dev/null +++ b/infra/conda/chaste/2024.1/build-package.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +set -xeo pipefail + +# Show usage +usage() { + echo 'Usage: '"$(basename "$0")"' --variant=name [--parallel=num]' + echo 'Example:' + echo 'docker run --rm -it quay.io/condaforge/linux-anvil-cos7-x86_64 /bin/bash' + echo "$(basename "$0")"' --variant=linux_64_python3.8_cpython --parallel=4' + exit 1 +} + +# Parse args +variant= +parallel= + +for option; do + case $option in + --variant=*) + variant=$(expr "x$option" : "x--variant=\(.*\)") + ;; + --parallel=*) + parallel=$(expr "x$option" : "x--parallel=\(.*\)") + ;; + *) + echo "Unknown option: $option" 1>&2 + exit 1 + ;; + esac +done + +if [ -z "${variant}" ]; then usage; fi + +# Configure environment +export FEEDSTOCK_ROOT="$(pwd)" +export RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" +export CONFIG_FILE="${FEEDSTOCK_ROOT}/variants/${variant}.yaml" +export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" + +export CPU_COUNT="${parallel:-$(nproc)}" + +export PYTHONUNBUFFERED=1 + +# Configure conda build path +mkdir -p "${CONDA_BLD_PATH}" + +cat >~/.condarc <"${CONDA_PREFIX}"/etc/conda/activate.d/conda-forge-ci-setup-activate.sh < $SP_DIR/chaste-$PKG_VERSION.egg-info < ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ - -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py311/LICENSE.txt b/infra/conda/chaste/py311/LICENSE.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py311/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py311/build.sh b/infra/conda/chaste/py311/build.sh deleted file mode 100755 index 8750ec0a..00000000 --- a/infra/conda/chaste/py311/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.11.____cpython' -export CHASTE_GIT_REF='2024.1' -export PYCHASTE_GIT_REF='2024.1' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=2 - -.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py311/recipe/meta.yaml b/infra/conda/chaste/py311/recipe/meta.yaml deleted file mode 100644 index a7d05406..00000000 --- a/infra/conda/chaste/py311/recipe/meta.yaml +++ /dev/null @@ -1,80 +0,0 @@ -{% set version = "2023.10.dev1" %} -{% set build = 0 %} - -{% set build_string = "py{}h{}_{}".format(CONDA_PY, PKG_HASH, build) %} - -package: - name: chaste - version: {{ version }} - -source: - path: /tmp/Chaste - -build: - number: {{ build }} - -requirements: - build: - - {{ compiler('cxx') }} - - {{ compiler('fortran') }} - - cmake - - make - - python - - pip - - distro - - git - - {{ cdt('libice-devel') }} - - {{ cdt('libsm-devel') }} - - {{ cdt('libx11-devel') }} - - {{ cdt('libxext') }} - - {{ cdt('libxt-devel') }} - - host: - - python - - boost-cpp - - hdf5 - - hdf5 * mpi_mpich* - - metis - - mpich - - parmetis - - petsc - - petsc4py - - sundials - - vtk - - xerces-c - - xsd 4.* - - xvfbwrapper - - run: - - python - - boost-cpp - - hdf5 - - hdf5 * mpi_mpich* - - metis - - mpich - - parmetis - - petsc - - petsc4py - - sundials - - vtk - - xerces-c - - xsd 4.* - - xvfbwrapper - - matplotlib - - numpy - -test: - imports: - - chaste - - chaste.cell_based - - chaste.mesh - - chaste.ode - - chaste.pde - -about: - home: https://chaste.github.io - license: BSD-3-Clause - summary: > - Chaste is a general purpose simulation package for computational biology. - dev_url: https://github.com/Chaste/Chaste - doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py311/recipe/patches/petsc.patch b/infra/conda/chaste/py311/recipe/patches/petsc.patch deleted file mode 100644 index c00aca46..00000000 --- a/infra/conda/chaste/py311/recipe/patches/petsc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/petscsys.h -+++ b/petscsys.h -@@ -233,8 +233,8 @@ - #elif defined(PETSC_HAVE_MPICH_NUMVERSION) - # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) - # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" --# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) --# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" -+//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) -+//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" - # endif - #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) - # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py311/recipe/patches/vtk.patch b/infra/conda/chaste/py311/recipe/patches/vtk.patch deleted file mode 100644 index a61d7b14..00000000 --- a/infra/conda/chaste/py311/recipe/patches/vtk.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/VTKConfig.cmake -+++ b/VTKConfig.cmake -@@ -25,8 +25,8 @@ - if (CMAKE_VERSION VERSION_LESS "3.1") - message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") - endif() -- set(CMAKE_CXX_STANDARD 11) -- set(CMAKE_CXX_STANDARD_REQUIRED 11) -+ set(CMAKE_CXX_STANDARD 17) -+ set(CMAKE_CXX_STANDARD_REQUIRED 17) - endif() - - # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py311/recipe/recipe-scripts-license.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py312/.gitignore b/infra/conda/chaste/py312/.gitignore deleted file mode 100755 index c89ecb7d..00000000 --- a/infra/conda/chaste/py312/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pyc - -build_artifacts diff --git a/infra/conda/chaste/py312/.scripts/build_steps.sh b/infra/conda/chaste/py312/.scripts/build_steps.sh deleted file mode 100755 index 4dca84f9..00000000 --- a/infra/conda/chaste/py312/.scripts/build_steps.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ - -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py312/LICENSE.txt b/infra/conda/chaste/py312/LICENSE.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py312/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py312/build.sh b/infra/conda/chaste/py312/build.sh deleted file mode 100755 index ffbfcd32..00000000 --- a/infra/conda/chaste/py312/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.12.____cpython' -export CHASTE_GIT_REF='2024.1' -export PYCHASTE_GIT_REF='2024.1' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=2 - -.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py312/recipe/build.sh b/infra/conda/chaste/py312/recipe/build.sh deleted file mode 100755 index 41cfc230..00000000 --- a/infra/conda/chaste/py312/recipe/build.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -set -ex - -BUILD_CONFIG=Release - -# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) -# because PETSc already accepted MPICH version during conda solve -cd ${PREFIX}/include -patch -t -p1 < /tmp/patches/petsc.patch - -cd ${PREFIX}/lib/cmake/vtk-7.1 -patch -t -p1 < /tmp/patches/vtk.patch - -# Modify pip environment for chaste_codegen -export PIP_NO_DEPENDENCIES="False" -export PIP_NO_INDEX="False" - -cd ${PREFIX} -mkdir build -cd build || exit - -cmake \ - -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ - -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ - -DCMAKE_PREFIX_PATH="${PREFIX}" \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DBUILD_SHARED_LIBS=ON \ - -DBOOST_ROOT="${PREFIX}" \ - -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ - -DPYTHON_EXECUTABLE=${PYTHON} \ - -DVTK_DIR=${PREFIX} \ - -DXERCESC_INCLUDE="${PREFIX}/include" \ - -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ - -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ - $SRC_DIR - -# Revert pip environment settings -export PIP_NO_DEPENDENCIES="True" -export PIP_NO_INDEX="True" - -make chaste_project_PyChaste -j${CPU_COUNT} -make project_PyChaste_Python -j${CPU_COUNT} -#make install -j${CPU_COUNT} - -cd projects/PyChaste/python -pip install . --prefix=${PREFIX} - -# Cleanup -cd ${PREFIX}/build -rm -rf cell_based/CMakeFiles -rm -rf global/CMakeFiles -rm -rf io/CMakeFiles -rm -rf linalg/CMakeFiles -rm -rf mesh/CMakeFiles -rm -rf ode/CMakeFiles -rm -rf pde/CMakeFiles -rm -rf python -rm -rf projects/PyChaste/CMakeFiles -rm -rf projects/PyChaste/python - -# The egg-info file is necessary because some packages -# need pkg_resources to be able to find chaste. -# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects - -cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < - Chaste is a general purpose simulation package for computational biology. - dev_url: https://github.com/Chaste/Chaste - doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py312/recipe/patches/petsc.patch b/infra/conda/chaste/py312/recipe/patches/petsc.patch deleted file mode 100644 index c00aca46..00000000 --- a/infra/conda/chaste/py312/recipe/patches/petsc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/petscsys.h -+++ b/petscsys.h -@@ -233,8 +233,8 @@ - #elif defined(PETSC_HAVE_MPICH_NUMVERSION) - # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) - # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" --# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) --# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" -+//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) -+//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" - # endif - #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) - # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py312/recipe/patches/vtk.patch b/infra/conda/chaste/py312/recipe/patches/vtk.patch deleted file mode 100644 index a61d7b14..00000000 --- a/infra/conda/chaste/py312/recipe/patches/vtk.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/VTKConfig.cmake -+++ b/VTKConfig.cmake -@@ -25,8 +25,8 @@ - if (CMAKE_VERSION VERSION_LESS "3.1") - message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") - endif() -- set(CMAKE_CXX_STANDARD 11) -- set(CMAKE_CXX_STANDARD_REQUIRED 11) -+ set(CMAKE_CXX_STANDARD 17) -+ set(CMAKE_CXX_STANDARD_REQUIRED 17) - endif() - - # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py312/recipe/recipe-scripts-license.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py38/.gitignore b/infra/conda/chaste/py38/.gitignore deleted file mode 100755 index c89ecb7d..00000000 --- a/infra/conda/chaste/py38/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pyc - -build_artifacts diff --git a/infra/conda/chaste/py38/.scripts/build_steps.sh b/infra/conda/chaste/py38/.scripts/build_steps.sh deleted file mode 100755 index 4dca84f9..00000000 --- a/infra/conda/chaste/py38/.scripts/build_steps.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ - -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py38/LICENSE.txt b/infra/conda/chaste/py38/LICENSE.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py38/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py38/build.sh b/infra/conda/chaste/py38/build.sh deleted file mode 100755 index 73806298..00000000 --- a/infra/conda/chaste/py38/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.8.____cpython' -export CHASTE_GIT_REF='2024.1' -export PYCHASTE_GIT_REF='2024.1' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=2 - -.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py38/recipe/build.sh b/infra/conda/chaste/py38/recipe/build.sh deleted file mode 100755 index 41cfc230..00000000 --- a/infra/conda/chaste/py38/recipe/build.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -set -ex - -BUILD_CONFIG=Release - -# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) -# because PETSc already accepted MPICH version during conda solve -cd ${PREFIX}/include -patch -t -p1 < /tmp/patches/petsc.patch - -cd ${PREFIX}/lib/cmake/vtk-7.1 -patch -t -p1 < /tmp/patches/vtk.patch - -# Modify pip environment for chaste_codegen -export PIP_NO_DEPENDENCIES="False" -export PIP_NO_INDEX="False" - -cd ${PREFIX} -mkdir build -cd build || exit - -cmake \ - -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ - -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ - -DCMAKE_PREFIX_PATH="${PREFIX}" \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DBUILD_SHARED_LIBS=ON \ - -DBOOST_ROOT="${PREFIX}" \ - -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ - -DPYTHON_EXECUTABLE=${PYTHON} \ - -DVTK_DIR=${PREFIX} \ - -DXERCESC_INCLUDE="${PREFIX}/include" \ - -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ - -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ - $SRC_DIR - -# Revert pip environment settings -export PIP_NO_DEPENDENCIES="True" -export PIP_NO_INDEX="True" - -make chaste_project_PyChaste -j${CPU_COUNT} -make project_PyChaste_Python -j${CPU_COUNT} -#make install -j${CPU_COUNT} - -cd projects/PyChaste/python -pip install . --prefix=${PREFIX} - -# Cleanup -cd ${PREFIX}/build -rm -rf cell_based/CMakeFiles -rm -rf global/CMakeFiles -rm -rf io/CMakeFiles -rm -rf linalg/CMakeFiles -rm -rf mesh/CMakeFiles -rm -rf ode/CMakeFiles -rm -rf pde/CMakeFiles -rm -rf python -rm -rf projects/PyChaste/CMakeFiles -rm -rf projects/PyChaste/python - -# The egg-info file is necessary because some packages -# need pkg_resources to be able to find chaste. -# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects - -cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < - Chaste is a general purpose simulation package for computational biology. - dev_url: https://github.com/Chaste/Chaste - doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py38/recipe/patches/petsc.patch b/infra/conda/chaste/py38/recipe/patches/petsc.patch deleted file mode 100644 index c00aca46..00000000 --- a/infra/conda/chaste/py38/recipe/patches/petsc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/petscsys.h -+++ b/petscsys.h -@@ -233,8 +233,8 @@ - #elif defined(PETSC_HAVE_MPICH_NUMVERSION) - # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) - # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" --# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) --# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" -+//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) -+//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" - # endif - #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) - # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py38/recipe/patches/vtk.patch b/infra/conda/chaste/py38/recipe/patches/vtk.patch deleted file mode 100644 index a61d7b14..00000000 --- a/infra/conda/chaste/py38/recipe/patches/vtk.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/VTKConfig.cmake -+++ b/VTKConfig.cmake -@@ -25,8 +25,8 @@ - if (CMAKE_VERSION VERSION_LESS "3.1") - message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") - endif() -- set(CMAKE_CXX_STANDARD 11) -- set(CMAKE_CXX_STANDARD_REQUIRED 11) -+ set(CMAKE_CXX_STANDARD 17) -+ set(CMAKE_CXX_STANDARD_REQUIRED 17) - endif() - - # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py38/recipe/recipe-scripts-license.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py39/.gitignore b/infra/conda/chaste/py39/.gitignore deleted file mode 100755 index c89ecb7d..00000000 --- a/infra/conda/chaste/py39/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pyc - -build_artifacts diff --git a/infra/conda/chaste/py39/.scripts/build_steps.sh b/infra/conda/chaste/py39/.scripts/build_steps.sh deleted file mode 100755 index 4dca84f9..00000000 --- a/infra/conda/chaste/py39/.scripts/build_steps.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ - -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/py39/LICENSE.txt b/infra/conda/chaste/py39/LICENSE.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py39/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/infra/conda/chaste/py39/build.sh b/infra/conda/chaste/py39/build.sh deleted file mode 100755 index f97938ad..00000000 --- a/infra/conda/chaste/py39/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -xeo pipefail - -export CONFIG='linux_64_python3.9.____cpython' -export CHASTE_GIT_REF='2024.1' -export PYCHASTE_GIT_REF='2024.1' -export BUILD_WITH_CONDA_DEBUG='0' -export DOCKER_IMAGE='quay.io/condaforge/linux-anvil-cos7-x86_64' -export CPU_COUNT=2 - -.scripts/run_docker_build.sh diff --git a/infra/conda/chaste/py39/recipe/build.sh b/infra/conda/chaste/py39/recipe/build.sh deleted file mode 100755 index 41cfc230..00000000 --- a/infra/conda/chaste/py39/recipe/build.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -set -ex - -BUILD_CONFIG=Release - -# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) -# because PETSc already accepted MPICH version during conda solve -cd ${PREFIX}/include -patch -t -p1 < /tmp/patches/petsc.patch - -cd ${PREFIX}/lib/cmake/vtk-7.1 -patch -t -p1 < /tmp/patches/vtk.patch - -# Modify pip environment for chaste_codegen -export PIP_NO_DEPENDENCIES="False" -export PIP_NO_INDEX="False" - -cd ${PREFIX} -mkdir build -cd build || exit - -cmake \ - -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} \ - -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ - -DCMAKE_PREFIX_PATH="${PREFIX}" \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DBUILD_SHARED_LIBS=ON \ - -DBOOST_ROOT="${PREFIX}" \ - -DHDF5_C_COMPILER_EXECUTABLE="${PREFIX}/bin/h5pcc" \ - -DPYTHON_EXECUTABLE=${PYTHON} \ - -DVTK_DIR=${PREFIX} \ - -DXERCESC_INCLUDE="${PREFIX}/include" \ - -DXERCESC_LIBRARY="${PREFIX}/lib/libxerces-c.so" \ - -DXSD_EXECUTABLE="${PREFIX}/bin/xsd" \ - $SRC_DIR - -# Revert pip environment settings -export PIP_NO_DEPENDENCIES="True" -export PIP_NO_INDEX="True" - -make chaste_project_PyChaste -j${CPU_COUNT} -make project_PyChaste_Python -j${CPU_COUNT} -#make install -j${CPU_COUNT} - -cd projects/PyChaste/python -pip install . --prefix=${PREFIX} - -# Cleanup -cd ${PREFIX}/build -rm -rf cell_based/CMakeFiles -rm -rf global/CMakeFiles -rm -rf io/CMakeFiles -rm -rf linalg/CMakeFiles -rm -rf mesh/CMakeFiles -rm -rf ode/CMakeFiles -rm -rf pde/CMakeFiles -rm -rf python -rm -rf projects/PyChaste/CMakeFiles -rm -rf projects/PyChaste/python - -# The egg-info file is necessary because some packages -# need pkg_resources to be able to find chaste. -# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects - -cat > $SP_DIR/chaste-$PKG_VERSION.egg-info < - Chaste is a general purpose simulation package for computational biology. - dev_url: https://github.com/Chaste/Chaste - doc_url: https://chaste.github.io/docs/ diff --git a/infra/conda/chaste/py39/recipe/patches/petsc.patch b/infra/conda/chaste/py39/recipe/patches/petsc.patch deleted file mode 100644 index c00aca46..00000000 --- a/infra/conda/chaste/py39/recipe/patches/petsc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/petscsys.h -+++ b/petscsys.h -@@ -233,8 +233,8 @@ - #elif defined(PETSC_HAVE_MPICH_NUMVERSION) - # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) - # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" --# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) --# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" -+//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) -+//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" - # endif - #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) - # if !defined(OMPI_MAJOR_VERSION) diff --git a/infra/conda/chaste/py39/recipe/patches/vtk.patch b/infra/conda/chaste/py39/recipe/patches/vtk.patch deleted file mode 100644 index a61d7b14..00000000 --- a/infra/conda/chaste/py39/recipe/patches/vtk.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/VTKConfig.cmake -+++ b/VTKConfig.cmake -@@ -25,8 +25,8 @@ - if (CMAKE_VERSION VERSION_LESS "3.1") - message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature. Configuring projects this way requires a newer version of CMake. Please update to CMake 3.1 or newer") - endif() -- set(CMAKE_CXX_STANDARD 11) -- set(CMAKE_CXX_STANDARD_REQUIRED 11) -+ set(CMAKE_CXX_STANDARD 17) -+ set(CMAKE_CXX_STANDARD_REQUIRED 17) - endif() - - # The C and C++ flags added by VTK to the cmake-configured flags. diff --git a/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt b/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt deleted file mode 100644 index 2ec51d75..00000000 --- a/infra/conda/chaste/py39/recipe/recipe-scripts-license.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. From 618a4fe22a42fb78c8da4d6d1b538807e9201e49 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 18:49:13 +0000 Subject: [PATCH 32/53] #42 reduce vtk dependencies --- infra/conda/vtk/7.1/recipe/meta.yaml | 16 ---------------- .../variants/linux_64_python3.10_cpython.yaml | 12 ------------ .../variants/linux_64_python3.11_cpython.yaml | 12 ------------ .../variants/linux_64_python3.12_cpython.yaml | 12 ------------ .../7.1/variants/linux_64_python3.8_cpython.yaml | 12 ------------ .../7.1/variants/linux_64_python3.9_cpython.yaml | 12 ------------ 6 files changed, 76 deletions(-) diff --git a/infra/conda/vtk/7.1/recipe/meta.yaml b/infra/conda/vtk/7.1/recipe/meta.yaml index d76b015e..372c017d 100755 --- a/infra/conda/vtk/7.1/recipe/meta.yaml +++ b/infra/conda/vtk/7.1/recipe/meta.yaml @@ -59,16 +59,8 @@ requirements: - libpng - libtiff - libxml2 - - metis - mpich - - mpi4py - - parmetis - - petsc - - petsc4py - python - - sundials - - xerces-c - - xsd - zlib run: @@ -84,16 +76,8 @@ requirements: - libpng - libtiff - libxml2 - - metis - mpich - - mpi4py - - parmetis - - petsc - - petsc4py - python - - sundials - - xerces-c - - xsd - zlib test: diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml index 11e0d342..52b88fed 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml @@ -33,28 +33,16 @@ libtiff: - "4" libxml2: - "2" -metis: - - ">=4" mpich: - ">=3" -parmetis: - - ">=4" -petsc: - - ">=3.8,<3.19" pin_run_as_build: python: min_pin: x.x max_pin: x.x python: - 3.10.* *_cpython -sundials: - - ">=3.0,<6.0" target_platform: - linux-64 -xercesc: - - "3" -xsd: - - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml index 5f9561dd..b4d15bf1 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml @@ -33,28 +33,16 @@ libtiff: - "4" libxml2: - "2" -metis: - - ">=4" mpich: - ">=3" -parmetis: - - ">=4" -petsc: - - ">=3.8,<3.19" pin_run_as_build: python: min_pin: x.x max_pin: x.x python: - 3.11.* *_cpython -sundials: - - ">=3.0,<6.0" target_platform: - linux-64 -xercesc: - - "3" -xsd: - - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml index 329460a6..32f50c13 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml @@ -33,28 +33,16 @@ libtiff: - "4" libxml2: - "2" -metis: - - ">=4" mpich: - ">=3" -parmetis: - - ">=4" -petsc: - - ">=3.8,<3.19" pin_run_as_build: python: min_pin: x.x max_pin: x.x python: - 3.12.* *_cpython -sundials: - - ">=3.0,<6.0" target_platform: - linux-64 -xercesc: - - "3" -xsd: - - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml index 434d78dc..b01c7448 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml @@ -33,28 +33,16 @@ libtiff: - "4" libxml2: - "2" -metis: - - ">=4" mpich: - ">=3" -parmetis: - - ">=4" -petsc: - - ">=3.8,<3.19" pin_run_as_build: python: min_pin: x.x max_pin: x.x python: - 3.8.* *_cpython -sundials: - - ">=3.0,<6.0" target_platform: - linux-64 -xercesc: - - "3" -xsd: - - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml index c34658f9..b2ef72fa 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml @@ -33,28 +33,16 @@ libtiff: - "4" libxml2: - "2" -metis: - - ">=4" mpich: - ">=3" -parmetis: - - ">=4" -petsc: - - ">=3.8,<3.19" pin_run_as_build: python: min_pin: x.x max_pin: x.x python: - 3.9.* *_cpython -sundials: - - ">=3.0,<6.0" target_platform: - linux-64 -xercesc: - - "3" -xsd: - - "4" zip_keys: - - cxx_compiler_version - fortran_compiler_version From e6d8a26d55c477e84403427619a0429dc35dd294 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 18:55:07 +0000 Subject: [PATCH 33/53] #42 update chaste conda variants --- .../chaste/2024.1/scripts/build_steps.sh | 72 ------------------- .../chaste/2024.1/scripts/run_docker_build.sh | 35 --------- .../variants/linux_64_python3.10_cpython.yaml | 64 ++++++++--------- .../variants/linux_64_python3.11_cpython.yaml | 64 ++++++++--------- .../variants/linux_64_python3.12_cpython.yaml | 64 ++++++++--------- .../variants/linux_64_python3.8_cpython.yaml | 64 ++++++++--------- .../variants/linux_64_python3.9_cpython.yaml | 64 ++++++++--------- 7 files changed, 150 insertions(+), 277 deletions(-) delete mode 100755 infra/conda/chaste/2024.1/scripts/build_steps.sh delete mode 100755 infra/conda/chaste/2024.1/scripts/run_docker_build.sh diff --git a/infra/conda/chaste/2024.1/scripts/build_steps.sh b/infra/conda/chaste/2024.1/scripts/build_steps.sh deleted file mode 100755 index 4dca84f9..00000000 --- a/infra/conda/chaste/2024.1/scripts/build_steps.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 - -export FEEDSTOCK_ROOT='/home/conda/feedstock_root' -export RECIPE_ROOT='/home/conda/recipe_root' - -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -export CONDA_BLD_PATH="${FEEDSTOCK_ROOT}/build_artifacts" - -cat > ~/.condarc < ${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh </dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" - -ARTIFACTS="${FEEDSTOCK_ROOT}/build_artifacts" -mkdir -p "${ARTIFACTS}" - -DONE_CANARY="${ARTIFACTS}/conda-forge-build-done-${CONFIG}" -rm -f "${DONE_CANARY}" - -docker info - -DOCKER_IMAGE="${DOCKER_IMAGE:-quay.io/condaforge/linux-anvil-cos7-x86_64}" -docker pull "${DOCKER_IMAGE}" - -export HOST_USER_ID=$(id -u) - -docker run --rm -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG="${CONFIG}" \ - -e BUILD_WITH_CONDA_DEBUG="${BUILD_WITH_CONDA_DEBUG}" \ - -e CPU_COUNT="${CPU_COUNT}" \ - -e HOST_USER_ID="${HOST_USER_ID}" \ - -e CHASTE_GIT_REF="${CHASTE_GIT_REF}" \ - -e PYCHASTE_GIT_REF="${PYCHASTE_GIT_REF}" \ - "${DOCKER_IMAGE}" \ - bash "/home/conda/feedstock_root/.scripts/build_steps.sh" - -test -f "${DONE_CANARY}" diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml index 3dfeee0d..55ae2d0f 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml @@ -1,50 +1,46 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main -chaste: -- 2024.01 + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' + - "11" hdf5: -- '>=1.10,<1.11' + - ">=1.10,<1.14" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.17' + - ">=3.12,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.10.* *_cpython sundials: -- '>=3.0,<6.0' + - ">=3.0,<6.0" vtk: -- '7.1.1' + - "7.1.1" xercesc: -- '>=3' + - ">=3" +target_platform: + - linux-64 +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml index e1a6f83a..868bd409 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml @@ -1,50 +1,46 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main -chaste: -- 2024.01 + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' + - "11" hdf5: -- '>=1.10,<1.13' + - ">=1.10,<1.14" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.18' + - ">=3.12,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.11.* *_cpython sundials: -- '>=3.0,<6.0' + - ">=3.0,<6.0" vtk: -- '7.1.1' + - "7.1.1" xercesc: -- '>=3' + - ">=3" +target_platform: + - linux-64 +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml index cd1f1bde..5edb9418 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml @@ -1,50 +1,46 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main -chaste: -- 2024.01 + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.12.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' + - "11" hdf5: -- '>=1.10,<1.13' + - ">=1.10,<1.14" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.18' + - ">=3.12,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.12.* *_cpython sundials: -- '>=3.0,<6.0' + - ">=3.0,<6.0" vtk: -- '7.1.1' + - "7.1.1" xercesc: -- '>=3' + - ">=3" +target_platform: + - linux-64 +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml index 22f91997..785f1ffe 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml @@ -1,50 +1,46 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main -chaste: -- 2024.01 + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.8.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' + - "11" hdf5: -- '>=1.10,<1.11' + - ">=1.10,<1.14" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.17' + - ">=3.12,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.8.* *_cpython sundials: -- '>=3.0,<6.0' + - ">=3.0,<6.0" vtk: -- '7.1.1' + - "7.1.1" xercesc: -- '>=3' + - ">=3" +target_platform: + - linux-64 +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml index 397c8704..2100de82 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml @@ -1,50 +1,46 @@ +boostcpp: + - ">=1.68,<1.76" cdt_name: -- cos7 + - cos7 channel_sources: -- pychaste -- conda-forge -- bioconda + - pychaste + - conda-forge channel_targets: -- pychaste main -chaste: -- 2024.01 + - pychaste main cxx_compiler: -- gxx + - gxx cxx_compiler_version: -- '11' + - "11" docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 + - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: -- gfortran + - gfortran fortran_compiler_version: -- '11' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.9.* *_cpython -target_platform: -- linux-64 -zip_keys: -- - cxx_compiler_version - - fortran_compiler_version - -boostcpp: -- '>=1.68,<1.76' + - "11" hdf5: -- '>=1.10,<1.11' + - ">=1.10,<1.14" metis: -- '>=4' + - ">=4" mpich: -- '>=3' + - ">=3" parmetis: -- '>=4' + - ">=4" petsc: -- '>=3.12,<3.17' + - ">=3.12,<3.19" +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: + - 3.9.* *_cpython sundials: -- '>=3.0,<6.0' + - ">=3.0,<6.0" vtk: -- '7.1.1' + - "7.1.1" xercesc: -- '>=3' + - ">=3" +target_platform: + - linux-64 +zip_keys: + - - cxx_compiler_version + - fortran_compiler_version From 42358f09419879f1a7ccdd630a49212f43439a90 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Wed, 17 Apr 2024 20:06:43 +0000 Subject: [PATCH 34/53] #42 chaste conda remove old patches --- infra/conda/chaste/2024.1/build-package.sh | 4 ---- infra/conda/chaste/2024.1/recipe/build.sh | 5 ----- .../conda/chaste/2024.1/recipe/patches/petsc.patch | 13 ------------- 3 files changed, 22 deletions(-) delete mode 100644 infra/conda/chaste/2024.1/recipe/patches/petsc.patch diff --git a/infra/conda/chaste/2024.1/build-package.sh b/infra/conda/chaste/2024.1/build-package.sh index df68446b..0aee6b56 100755 --- a/infra/conda/chaste/2024.1/build-package.sh +++ b/infra/conda/chaste/2024.1/build-package.sh @@ -92,9 +92,5 @@ conda list --show-channel-urls git clone --recursive --branch 2024.1 --depth 1 https://github.com/Chaste/Chaste.git /tmp/Chaste git clone --recursive --branch 2024.1 --depth 1 https://github.com/Chaste/PyChaste.git /tmp/Chaste/projects/PyChaste -# Copy extra patches -mkdir -p /tmp/patches -cp "${RECIPE_ROOT}"/patches/* /tmp/patches/ - # Build conda package conda mambabuild "${RECIPE_ROOT}" --variant-config-files "${CONFIG_FILE}" diff --git a/infra/conda/chaste/2024.1/recipe/build.sh b/infra/conda/chaste/2024.1/recipe/build.sh index e0808795..c98c6112 100755 --- a/infra/conda/chaste/2024.1/recipe/build.sh +++ b/infra/conda/chaste/2024.1/recipe/build.sh @@ -1,11 +1,6 @@ #!/bin/bash set -ex -# Ignore PETSc MPICH version warning (4.1.* installed but expected 4.0.*) -# because PETSc already accepted MPICH version during conda solve -cd ${PREFIX}/include -patch -t -p1 < /tmp/patches/petsc.patch - cd ${PREFIX} mkdir build cd build || exit diff --git a/infra/conda/chaste/2024.1/recipe/patches/petsc.patch b/infra/conda/chaste/2024.1/recipe/patches/petsc.patch deleted file mode 100644 index c00aca46..00000000 --- a/infra/conda/chaste/2024.1/recipe/patches/petsc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/petscsys.h -+++ b/petscsys.h -@@ -233,8 +233,8 @@ - #elif defined(PETSC_HAVE_MPICH_NUMVERSION) - # if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) - # error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" --# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) --# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" -+//# elif (MPICH_NUMVERSION/100000 != PETSC_HAVE_MPICH_NUMVERSION/100000) || (MPICH_NUMVERSION%100000/1000 < PETSC_HAVE_MPICH_NUMVERSION%100000/1000) -+//# error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version" - # endif - #elif defined(PETSC_HAVE_OMPI_MAJOR_VERSION) - # if !defined(OMPI_MAJOR_VERSION) From 283189224426b5742ac4275f28594c6d167c757f Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 14:17:54 +0000 Subject: [PATCH 35/53] #42 relax conda vtk cmake cxx std --- infra/conda/vtk/7.1/recipe/build.sh | 5 +++++ infra/conda/vtk/7.1/recipe/meta.yaml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/infra/conda/vtk/7.1/recipe/build.sh b/infra/conda/vtk/7.1/recipe/build.sh index 0241183a..fab463aa 100755 --- a/infra/conda/vtk/7.1/recipe/build.sh +++ b/infra/conda/vtk/7.1/recipe/build.sh @@ -40,6 +40,11 @@ cmake \ .. make -j ${CPU_COUNT} + +# Relax CMAKE_CXX_STANDARD for external projects +sed -i.bak '/set(CMAKE_CXX_STANDARD 11)/d' ./CMakeFiles/VTKConfig.cmake +sed -i.bak '/set(CMAKE_CXX_STANDARD_REQUIRED 11)/d' ./CMakeFiles/VTKConfig.cmake + make install # The egg-info file is necessary because some packages, diff --git a/infra/conda/vtk/7.1/recipe/meta.yaml b/infra/conda/vtk/7.1/recipe/meta.yaml index 372c017d..77205cb1 100755 --- a/infra/conda/vtk/7.1/recipe/meta.yaml +++ b/infra/conda/vtk/7.1/recipe/meta.yaml @@ -59,6 +59,7 @@ requirements: - libpng - libtiff - libxml2 + - mpi4py - mpich - python - zlib @@ -76,6 +77,7 @@ requirements: - libpng - libtiff - libxml2 + - mpi4py - mpich - python - zlib From d7abd4489cc994ce99491ad357d48ece1d62f0a5 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 17:36:01 +0000 Subject: [PATCH 36/53] #42 update conda vtk recipe for py310 --- infra/conda/.gitignore | 3 ++- infra/conda/vtk/7.1/recipe/build.sh | 3 +++ infra/conda/vtk/7.1/recipe/meta.yaml | 1 + .../7.1/variants/linux_64_python3.10_cpython.yaml | 14 ++++++++------ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/infra/conda/.gitignore b/infra/conda/.gitignore index b30e692d..c95801e8 100644 --- a/infra/conda/.gitignore +++ b/infra/conda/.gitignore @@ -1,9 +1,10 @@ *.pyc -build_artifacts +build_artifacts/ .bash_history .bash_logout .bash_profile .bashrc .conda/ .condarc +.cache diff --git a/infra/conda/vtk/7.1/recipe/build.sh b/infra/conda/vtk/7.1/recipe/build.sh index fab463aa..b2024d8b 100755 --- a/infra/conda/vtk/7.1/recipe/build.sh +++ b/infra/conda/vtk/7.1/recipe/build.sh @@ -45,6 +45,9 @@ make -j ${CPU_COUNT} sed -i.bak '/set(CMAKE_CXX_STANDARD 11)/d' ./CMakeFiles/VTKConfig.cmake sed -i.bak '/set(CMAKE_CXX_STANDARD_REQUIRED 11)/d' ./CMakeFiles/VTKConfig.cmake +# Fix rpaths +sed -i.bak -E 's|;[^;]*/_build_env/[^;]*/lib/|;|g' ./CMakeFiles/VTKTargets.cmake + make install # The egg-info file is necessary because some packages, diff --git a/infra/conda/vtk/7.1/recipe/meta.yaml b/infra/conda/vtk/7.1/recipe/meta.yaml index 77205cb1..6eea1b9a 100755 --- a/infra/conda/vtk/7.1/recipe/meta.yaml +++ b/infra/conda/vtk/7.1/recipe/meta.yaml @@ -61,6 +61,7 @@ requirements: - libxml2 - mpi4py - mpich + - petsc - python - zlib diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml index 52b88fed..278b8a3a 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.68" cdt_name: - cos7 channel_sources: @@ -14,15 +14,15 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 expat: - - "2" + - "2.6" fortran_compiler: - gfortran fortran_compiler_version: - "11" freetype: - - "2" + - "2.12" hdf5: - - ">=1.10,<1.14" + - "1.12" jpeg: - "9" jsoncpp: @@ -30,11 +30,13 @@ jsoncpp: libpng: - "1.6" libtiff: - - "4" + - "4.5" libxml2: - "2" mpich: - - ">=3" + - "4" +petsc: + - "3.18" pin_run_as_build: python: min_pin: x.x From 233436e4067d4e6a0a878a94f39cd29dad36d9eb Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 18:28:27 +0000 Subject: [PATCH 37/53] #42 update conda build action --- .github/workflows/conda-build-linux.yml | 37 ++++++++++++++++--------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/conda-build-linux.yml b/.github/workflows/conda-build-linux.yml index c0f4a3a6..fc1f7be0 100644 --- a/.github/workflows/conda-build-linux.yml +++ b/.github/workflows/conda-build-linux.yml @@ -2,23 +2,34 @@ name: conda-build-linux on: workflow_dispatch: + inputs: + variant: + description: "Variant of the conda package to build" + required: true + type: string + default: "linux_64_python3.10_cpython" jobs: - build: - runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 + - name: checkout + uses: actions/checkout@v4 - - name: build conda package - run: ./build-py310.sh - working-directory: infra/conda/chaste - - - name: upload conda package artifacts - uses: actions/upload-artifact@v4 - with: - name: pychaste-conda - path: infra/conda/chaste/build_artifacts/linux-64 + - name: build conda package + run: | + docker run -it --rm \ + -v $(pwd):/home/conda \ + -e HOST_USER_ID="$(id -u)" \ + quay.io/condaforge/linux-anvil-cos7-x86_64 \ + ./build-package.sh \ + --variant=${{ github.event.inputs.variant }} \ + --parallel=$(nproc) + working-directory: infra/conda/chaste + + - name: upload conda package artifacts + uses: actions/upload-artifact@v4 + with: + name: pychaste-conda + path: infra/conda/chaste/build_artifacts/linux-64 From dfac114e9d01edd4a09cbc46452ebaba5af07154 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 18:44:00 +0000 Subject: [PATCH 38/53] #42 tweak conda build action --- .github/workflows/conda-build-linux.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conda-build-linux.yml b/.github/workflows/conda-build-linux.yml index fc1f7be0..cec228c1 100644 --- a/.github/workflows/conda-build-linux.yml +++ b/.github/workflows/conda-build-linux.yml @@ -19,11 +19,8 @@ jobs: - name: build conda package run: | - docker run -it --rm \ - -v $(pwd):/home/conda \ - -e HOST_USER_ID="$(id -u)" \ - quay.io/condaforge/linux-anvil-cos7-x86_64 \ - ./build-package.sh \ + docker run -e HOST_USER_ID="$(id -u)" -v $(pwd):/home/conda \ + quay.io/condaforge/linux-anvil-cos7-x86_64 ./build-package.sh \ --variant=${{ github.event.inputs.variant }} \ --parallel=$(nproc) working-directory: infra/conda/chaste From ced740e8ffa72473a119c87b9c68b1b72ddd73b3 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 20:40:15 +0000 Subject: [PATCH 39/53] #42 update conda recipe versions --- infra/conda/.gitignore | 2 +- .../variants/linux_64_python3.9_cpython.yaml | 14 +++++++++++++- infra/conda/vtk/7.1/recipe/build.sh | 2 +- .../7.1/variants/linux_64_python3.9_cpython.yaml | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/infra/conda/.gitignore b/infra/conda/.gitignore index c95801e8..5bb2232a 100644 --- a/infra/conda/.gitignore +++ b/infra/conda/.gitignore @@ -7,4 +7,4 @@ build_artifacts/ .conda/ .condarc .cache - +.python_history diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml index 2100de82..89ab7c4d 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -28,9 +28,21 @@ parmetis: petsc: - ">=3.12,<3.19" pin_run_as_build: + boostcpp: + min_pin: x.x + max_pin: x.x + petsc: + min_pin: x.x + max_pin: x.x python: min_pin: x.x max_pin: x.x + sundials: + min_pin: x.x + max_pin: x.x + vtk: + min_pin: x.x + max_pin: x.x python: - 3.9.* *_cpython sundials: diff --git a/infra/conda/vtk/7.1/recipe/build.sh b/infra/conda/vtk/7.1/recipe/build.sh index b2024d8b..6994894e 100755 --- a/infra/conda/vtk/7.1/recipe/build.sh +++ b/infra/conda/vtk/7.1/recipe/build.sh @@ -46,7 +46,7 @@ sed -i.bak '/set(CMAKE_CXX_STANDARD 11)/d' ./CMakeFiles/VTKConfig.cmake sed -i.bak '/set(CMAKE_CXX_STANDARD_REQUIRED 11)/d' ./CMakeFiles/VTKConfig.cmake # Fix rpaths -sed -i.bak -E 's|;[^;]*/_build_env/[^;]*/lib/|;|g' ./CMakeFiles/VTKTargets.cmake +sed -i.bak -E 's|;[^;]*/_build_env/[^;]*/lib/|;|g' ./CMakeFiles/Export/*/VTKTargets.cmake make install diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml index b2ef72fa..b4d53515 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml @@ -35,6 +35,8 @@ libxml2: - "2" mpich: - ">=3" +petsc: + - ">=3.12,<3.19" pin_run_as_build: python: min_pin: x.x From ea6c74d5f52afb0e05b9b9e0648b773158985ca5 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 20:57:03 +0000 Subject: [PATCH 40/53] #42 test core imports --- test/ContinuousTestPack.txt | 1 + test/python/TestImports.py | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 test/python/TestImports.py diff --git a/test/ContinuousTestPack.txt b/test/ContinuousTestPack.txt index 7e6e9680..ffc0820c 100644 --- a/test/ContinuousTestPack.txt +++ b/test/ContinuousTestPack.txt @@ -1,6 +1,7 @@ visualization/TestVtkSceneWithCaBased.hpp visualization/TestVtkSceneWithMeshBased.hpp visualization/TestVtkSceneWithPottsBased.hpp +python/TestImports.py python/core/TestOutputFileHandlerPython.py python/core/TestFileFinderPython.py python/core/TestTimerPython.py diff --git a/test/python/TestImports.py b/test/python/TestImports.py new file mode 100644 index 00000000..b43b2481 --- /dev/null +++ b/test/python/TestImports.py @@ -0,0 +1,65 @@ +"""Copyright (c) 2005-2024, University of Oxford. +All rights reserved. + +University of Oxford means the Chancellor, Masters and Scholars of the +University of Oxford, having an administrative office at Wellington +Square, Oxford OX1 2JD, UK. + +This file is part of Chaste. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the University of Oxford nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +""" + +import unittest + + +class TestImports(unittest.TestCase): + def test_imports(self): + import chaste + + chaste.init() + + import chaste.core + import chaste.mesh + import chaste.ode + import chaste.pde + import chaste.cell_based + import chaste.visualization + + from chaste.core import ( + ChasteBuildInfo, + FileFinder, + Identifiable, + OutputFileHandler, + PetscTools, + ProgressReporter, + RandomNumberGenerator, + RelativeTo, + ReplicatableVector, + Timer, + TimeStepper, + ) + + +if __name__ == "__main__": + unittest.main() From 78f606b558e7235c7d86e74a382e797c1d4ab83c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Thu, 18 Apr 2024 21:06:13 +0000 Subject: [PATCH 41/53] #42 test mesh imports --- test/python/TestImports.py | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/test/python/TestImports.py b/test/python/TestImports.py index b43b2481..fcc35f5e 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -60,6 +60,80 @@ def test_imports(self): TimeStepper, ) + from chaste.mesh import ( + AbstractChasteRegion2, + AbstractChasteRegion3, + AbstractElement1_2, + AbstractElement2_2, + AbstractElement2_3, + AbstractElement3_3, + AbstractMesh2_2, + AbstractMesh3_3, + AbstractTetrahedralMesh2_2, + AbstractTetrahedralMesh3_3, + ChasteCuboid2, + ChasteCuboid3, + ChasteEllipsoid2, + ChasteEllipsoid3, + ChastePoint2, + ChastePoint3, + Cylindrical2dMesh, + Cylindrical2dNodesOnlyMesh, + Cylindrical2dVertexMesh, + CylindricalHoneycombMeshGenerator, + CylindricalHoneycombVertexMeshGenerator, + Edge2, + Edge3, + EdgeHelper2, + EdgeHelper3, + EdgeOperation, + Element2_2, + Element3_3, + FluidSource2, + FluidSource3, + HoneycombMeshGenerator, + HoneycombVertexMeshGenerator, + ImmersedBoundaryElement1_2, + ImmersedBoundaryElement2_2, + ImmersedBoundaryElement2_3, + ImmersedBoundaryElement3_3, + ImmersedBoundaryHoneycombMeshGenerator, + ImmersedBoundaryMesh2_2, + ImmersedBoundaryMesh3_3, + ImmersedBoundaryPalisadeMeshGenerator, + MutableElement1_2, + MutableElement2_2, + MutableElement2_3, + MutableElement3_3, + MutableMesh2_2, + MutableMesh3_3, + MutableVertexMesh2_2, + MutableVertexMesh3_3, + Node2, + Node3, + NodeAttributes2, + NodeAttributes3, + NodesOnlyMesh2, + NodesOnlyMesh3, + PeriodicNodesOnlyMesh2, + PeriodicNodesOnlyMesh3, + PottsElement2, + PottsElement3, + PottsMesh2, + PottsMesh3, + PottsMeshGenerator2, + PottsMeshGenerator3, + TetrahedralMesh2_2, + TetrahedralMesh3_3, + Toroidal2dMesh, + Toroidal2dVertexMesh, + ToroidalHoneycombMeshGenerator, + ToroidalHoneycombVertexMeshGenerator, + VertexMesh2_2, + VertexMesh3_3, + VoronoiVertexMeshGenerator, + ) + if __name__ == "__main__": unittest.main() From 01828b05b9230ad94e617af5c57f751d437bf216 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 08:07:17 +0000 Subject: [PATCH 42/53] #42 test ode imports --- test/python/TestImports.py | 52 +++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/test/python/TestImports.py b/test/python/TestImports.py index fcc35f5e..8f54c364 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -34,18 +34,20 @@ class TestImports(unittest.TestCase): - def test_imports(self): + + def test_cell_based_imports(self): import chaste chaste.init() - import chaste.core - import chaste.mesh - import chaste.ode - import chaste.pde import chaste.cell_based - import chaste.visualization + def test_core_imports(self): + import chaste + + chaste.init() + + import chaste.core from chaste.core import ( ChasteBuildInfo, FileFinder, @@ -60,6 +62,12 @@ def test_imports(self): TimeStepper, ) + def test_mesh_imports(self): + import chaste + + chaste.init() + + import chaste.mesh from chaste.mesh import ( AbstractChasteRegion2, AbstractChasteRegion3, @@ -134,6 +142,38 @@ def test_imports(self): VoronoiVertexMeshGenerator, ) + def test_ode_imports(self): + import chaste + + chaste.init() + + import chaste.ode + from chaste.ode import ( + AbstractOdeSystem, + AbstractOdeSystemInformation, + AbstractPythonOdeSystemInformation, + Alarcon2004OxygenBasedCellCycleOdeSystem, + DeltaNotchEdgeOdeSystem, + DeltaNotchInteriorOdeSystem, + DeltaNotchOdeSystem, + Goldbeter1991OdeSystem, + TysonNovak2001OdeSystem, + ) + + def test_pde_imports(self): + import chaste + + chaste.init() + + import chaste.pde + + def test_visualization_imports(self): + import chaste + + chaste.init() + + import chaste.visualization + if __name__ == "__main__": unittest.main() From 54d7d0b9c64c5d80f809d2ac92a1435d6b8f43f7 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 08:14:34 +0000 Subject: [PATCH 43/53] #42 test pde imports --- test/python/TestImports.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/python/TestImports.py b/test/python/TestImports.py index 8f54c364..01df876a 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -166,6 +166,23 @@ def test_pde_imports(self): chaste.init() import chaste.pde + from chaste.pde import ( + AbstractBoundaryCondition2, + AbstractBoundaryCondition3, + AbstractLinearEllipticPde2_2, + AbstractLinearEllipticPde3_3, + AbstractLinearParabolicPde2_2, + AbstractLinearParabolicPde3_3, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem2_2_1, + AbstractLinearParabolicPdeSystemForCoupledOdeSystem3_3_1, + AbstractLinearPde2_2, + AbstractLinearPde3_3, + AbstractNonlinearEllipticPde2, + AbstractNonlinearEllipticPde3, + ConstBoundaryCondition2, + ConstBoundaryCondition3, + PdeSimulationTime, + ) def test_visualization_imports(self): import chaste From cc22bc24dbf4485007dbae880dcc9b664e4a8851 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 08:17:06 +0000 Subject: [PATCH 44/53] #42 add visualization imports --- test/python/TestImports.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/python/TestImports.py b/test/python/TestImports.py index 01df876a..c8dd941c 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -190,6 +190,15 @@ def test_visualization_imports(self): chaste.init() import chaste.visualization + from chaste.visualization import ( + AbstractPyChasteActorGenerator2, + AbstractPyChasteActorGenerator3, + CellPopulationPyChasteActorGenerator2, + CellPopulationPyChasteActorGenerator3, + JupyterNotebookManager, + VtkScene2, + VtkScene3, + ) if __name__ == "__main__": From c6396eee4cf055b5e294b0ba43a2c36c0b3089ba Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 08:19:44 +0000 Subject: [PATCH 45/53] #42 test cell_based imports --- test/python/TestImports.py | 388 +++++++++++++++++++++++++++++++++++++ 1 file changed, 388 insertions(+) diff --git a/test/python/TestImports.py b/test/python/TestImports.py index c8dd941c..14b9fe0f 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -41,6 +41,394 @@ def test_cell_based_imports(self): chaste.init() import chaste.cell_based + from chaste.cell_based import ( + AbstractBoxDomainPdeModifier2, + AbstractBoxDomainPdeModifier3, + AbstractCaBasedDivisionRule2, + AbstractCaBasedDivisionRule3, + AbstractCaSwitchingUpdateRule2, + AbstractCaSwitchingUpdateRule3, + AbstractCaUpdateRule2, + AbstractCaUpdateRule3, + AbstractCellBasedSimulation2_2, + AbstractCellBasedSimulation3_3, + AbstractCellBasedSimulationModifier2_2, + AbstractCellBasedSimulationModifier3_3, + AbstractCellBasedWriter2_2, + AbstractCellBasedWriter3_3, + AbstractCellCycleModel, + AbstractCellCycleModelOdeSolver, + AbstractCellKiller2, + AbstractCellKiller3, + AbstractCellMutationState, + AbstractCellPopulation2_2, + AbstractCellPopulation3_3, + AbstractCellPopulationBoundaryCondition2_2, + AbstractCellPopulationBoundaryCondition3_3, + AbstractCellPopulationCountWriter2_2, + AbstractCellPopulationCountWriter3_3, + AbstractCellPopulationEventWriter2_2, + AbstractCellPopulationEventWriter3_3, + AbstractCellPopulationWriter2_2, + AbstractCellPopulationWriter3_3, + AbstractCellProliferativeType, + AbstractCellProperty, + AbstractCellWriter2_2, + AbstractCellWriter3_3, + AbstractCentreBasedCellPopulation2_2, + AbstractCentreBasedCellPopulation3_3, + AbstractCentreBasedDivisionRule2_2, + AbstractCentreBasedDivisionRule3_3, + AbstractForce2_2, + AbstractForce3_3, + AbstractGrowingDomainPdeModifier2, + AbstractGrowingDomainPdeModifier3, + AbstractImmersedBoundaryDivisionRule2, + AbstractImmersedBoundaryDivisionRule3, + AbstractImmersedBoundaryForce2, + AbstractImmersedBoundaryForce3, + AbstractNumericalMethod2_2, + AbstractNumericalMethod3_3, + AbstractOdeBasedCellCycleModel, + AbstractOdeBasedPhaseBasedCellCycleModel, + AbstractOdeSrnModel, + AbstractOffLatticeCellPopulation2_2, + AbstractOffLatticeCellPopulation3_3, + AbstractOnLatticeCellPopulation2, + AbstractOnLatticeCellPopulation3, + AbstractPdeModifier2, + AbstractPdeModifier3, + AbstractPhaseBasedCellCycleModel, + AbstractPottsUpdateRule2, + AbstractPottsUpdateRule3, + AbstractSimpleCellCycleModel, + AbstractSimpleGenerationalCellCycleModel, + AbstractSimplePhaseBasedCellCycleModel, + AbstractSrnModel, + AbstractTargetAreaModifier2, + AbstractTargetAreaModifier3, + AbstractTwoBodyInteractionForce2_2, + AbstractTwoBodyInteractionForce3_3, + AbstractUpdateRule2, + AbstractUpdateRule3, + AbstractVertexBasedDivisionRule2, + AbstractVertexBasedDivisionRule3, + AdhesionPottsUpdateRule2, + AdhesionPottsUpdateRule3, + Alarcon2004OxygenBasedCellCycleModel, + AlwaysDivideCellCycleModel, + ApcOneHitCellMutationState, + ApcTwoHitCellMutationState, + ApoptoticCellKiller2, + ApoptoticCellKiller3, + ApoptoticCellProperty, + AttractingPlaneBoundaryCondition2_2, + AttractingPlaneBoundaryCondition3_3, + AveragedSourceEllipticPde2, + AveragedSourceEllipticPde3, + AveragedSourceParabolicPde2, + AveragedSourceParabolicPde3, + BernoulliTrialCellCycleModel, + BetaCateninOneHitCellMutationState, + BiasedBernoulliTrialCellCycleModel, + BoundaryNodeWriter2_2, + BoundaryNodeWriter3_3, + BuskeAdhesiveForce2, + BuskeAdhesiveForce3, + BuskeCompressionForce2, + BuskeCompressionForce3, + BuskeElasticForce2, + BuskeElasticForce3, + CaBasedCellPopulation2, + CaBasedCellPopulation3, + CellAgesWriter2_2, + CellAgesWriter3_3, + CellAncestor, + CellAncestorWriter2_2, + CellAncestorWriter3_3, + CellAppliedForceWriter2_2, + CellAppliedForceWriter3_3, + CellBasedEllipticPdeSolver2, + CellBasedEllipticPdeSolver3, + CellBasedParabolicPdeSolver2, + CellBasedParabolicPdeSolver3, + Cell, + CellCycleModelProteinConcentrationsWriter2_2, + CellCycleModelProteinConcentrationsWriter3_3, + CellData, + CellDataItemWriter2_2, + CellDataItemWriter3_3, + CellDeltaNotchWriter2_2, + CellDeltaNotchWriter3_3, + CellDivisionLocationsWriter2_2, + CellDivisionLocationsWriter3_3, + CellEdgeData, + CellId, + CellIdWriter2_2, + CellIdWriter3_3, + CellLabel, + CellLabelWriter2_2, + CellLabelWriter3_3, + CellLocationIndexWriter2_2, + CellLocationIndexWriter3_3, + CellMutationStatesCountWriter2_2, + CellMutationStatesCountWriter3_3, + CellMutationStatesWriter2_2, + CellMutationStatesWriter3_3, + CellPopulationAdjacencyMatrixWriter2_2, + CellPopulationAdjacencyMatrixWriter3_3, + CellPopulationAreaWriter2_2, + CellPopulationAreaWriter3_3, + CellPopulationElementWriter2_2, + CellPopulationElementWriter3_3, + CellProliferativePhasesCountWriter2_2, + CellProliferativePhasesCountWriter3_3, + CellProliferativePhasesWriter2_2, + CellProliferativePhasesWriter3_3, + CellProliferativeTypesCountWriter2_2, + CellProliferativeTypesCountWriter3_3, + CellProliferativeTypesWriter2_2, + CellProliferativeTypesWriter3_3, + CellPropertyCollection, + CellPropertyRegistry, + CellRadiusWriter2_2, + CellRadiusWriter3_3, + CellRemovalLocationsWriter2_2, + CellRemovalLocationsWriter3_3, + CellRosetteRankWriter2_2, + CellRosetteRankWriter3_3, + CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_2, + CellsGeneratorAlarcon2004OxygenBasedCellCycleModel_3, + CellsGeneratorAlwaysDivideCellCycleModel_2, + CellsGeneratorAlwaysDivideCellCycleModel_3, + CellsGeneratorBernoulliTrialCellCycleModel_2, + CellsGeneratorBernoulliTrialCellCycleModel_3, + CellsGeneratorBiasedBernoulliTrialCellCycleModel_2, + CellsGeneratorBiasedBernoulliTrialCellCycleModel_3, + CellsGeneratorContactInhibitionCellCycleModel_2, + CellsGeneratorContactInhibitionCellCycleModel_3, + CellsGeneratorExponentialG1GenerationalCellCycleModel_2, + CellsGeneratorExponentialG1GenerationalCellCycleModel_3, + CellsGeneratorFixedG1GenerationalCellCycleModel_2, + CellsGeneratorFixedG1GenerationalCellCycleModel_3, + CellsGeneratorFixedSequenceCellCycleModel_2, + CellsGeneratorFixedSequenceCellCycleModel_3, + CellsGeneratorGammaG1CellCycleModel_2, + CellsGeneratorGammaG1CellCycleModel_3, + CellsGeneratorLabelDependentBernoulliTrialCellCycleModel_2, + CellsGeneratorLabelDependentBernoulliTrialCellCycleModel_3, + CellsGeneratorNoCellCycleModel_2, + CellsGeneratorNoCellCycleModel_3, + CellsGeneratorSimpleOxygenBasedCellCycleModel_2, + CellsGeneratorSimpleOxygenBasedCellCycleModel_3, + CellsGeneratorStochasticOxygenBasedCellCycleModel_2, + CellsGeneratorStochasticOxygenBasedCellCycleModel_3, + CellsGeneratorTysonNovakCellCycleModel_2, + CellsGeneratorTysonNovakCellCycleModel_3, + CellsGeneratorUniformCellCycleModel_2, + CellsGeneratorUniformCellCycleModel_3, + CellsGeneratorUniformG1GenerationalCellCycleModel_2, + CellsGeneratorUniformG1GenerationalCellCycleModel_3, + CellSrnModel, + CellVolumesWriter2_2, + CellVolumesWriter3_3, + CellwiseSourceEllipticPde2, + CellwiseSourceEllipticPde3, + CellwiseSourceParabolicPde2, + CellwiseSourceParabolicPde3, + ChemotacticForce2, + ChemotacticForce3, + ChemotaxisPottsUpdateRule2, + ChemotaxisPottsUpdateRule3, + ContactInhibitionCellCycleModel, + DefaultCellProliferativeType, + DeltaNotchEdgeInteriorTrackingModifier2, + DeltaNotchEdgeInteriorTrackingModifier3, + DeltaNotchEdgeSrnModel, + DeltaNotchInteriorSrnModel, + DeltaNotchSrnModel, + DeltaNotchTrackingModifier2, + DeltaNotchTrackingModifier3, + DifferentialAdhesionGeneralisedLinearSpringForce2_2, + DifferentialAdhesionGeneralisedLinearSpringForce3_3, + DifferentialAdhesionPottsUpdateRule2, + DifferentialAdhesionPottsUpdateRule3, + DifferentiatedCellProliferativeType, + DiffusionCaUpdateRule2, + DiffusionCaUpdateRule3, + DiffusionForce2, + DiffusionForce3, + DivisionBiasTrackingModifier2, + DivisionBiasTrackingModifier3, + Edge2, + Edge3, + EdgeOperation, + EllipticBoxDomainPdeModifier2, + EllipticBoxDomainPdeModifier3, + EllipticGrowingDomainPdeModifier2, + EllipticGrowingDomainPdeModifier3, + ExclusionCaBasedDivisionRule2, + ExclusionCaBasedDivisionRule3, + ExponentialG1GenerationalCellCycleModel, + ExtrinsicPullModifier2, + ExtrinsicPullModifier3, + FarhadifarForce2, + FarhadifarForce3, + FixedCentreBasedDivisionRule2_2, + FixedCentreBasedDivisionRule3_3, + FixedG1GenerationalCellCycleModel, + FixedSequenceCellCycleModel, + FixedVertexBasedDivisionRule2, + FixedVertexBasedDivisionRule3, + ForwardEulerNumericalMethod2_2, + ForwardEulerNumericalMethod3_3, + GammaG1CellCycleModel, + GeneralisedLinearSpringForce2_2, + GeneralisedLinearSpringForce3_3, + Goldbeter1991SrnModel, + HeterotypicBoundaryLengthWriter2_2, + HeterotypicBoundaryLengthWriter3_3, + ImmersedBoundaryBoundaryCellWriter2_2, + ImmersedBoundaryBoundaryCellWriter3_3, + ImmersedBoundaryCellPopulation2, + ImmersedBoundaryCellPopulation3, + ImmersedBoundaryKinematicFeedbackForce2, + ImmersedBoundaryKinematicFeedbackForce3, + ImmersedBoundaryLinearDifferentialAdhesionForce2, + ImmersedBoundaryLinearDifferentialAdhesionForce3, + ImmersedBoundaryLinearInteractionForce2, + ImmersedBoundaryLinearInteractionForce3, + ImmersedBoundaryLinearMembraneForce2, + ImmersedBoundaryLinearMembraneForce3, + ImmersedBoundaryMorseInteractionForce2, + ImmersedBoundaryMorseInteractionForce3, + ImmersedBoundaryMorseMembraneForce2, + ImmersedBoundaryMorseMembraneForce3, + ImmersedBoundaryNeighbourNumberWriter2_2, + ImmersedBoundaryNeighbourNumberWriter3_3, + ImmersedBoundarySimulationModifier2, + ImmersedBoundarySimulationModifier3, + ImmersedBoundarySvgWriter2, + ImmersedBoundarySvgWriter3, + IsolatedLabelledCellKiller2, + IsolatedLabelledCellKiller3, + LabelDependentBernoulliTrialCellCycleModel, + LegacyCellProliferativeTypesWriter2_2, + LegacyCellProliferativeTypesWriter3_3, + MeshBasedCellPopulation2_2, + MeshBasedCellPopulation3_3, + MeshBasedCellPopulationWithGhostNodes2, + MeshBasedCellPopulationWithGhostNodes3, + NagaiHondaDifferentialAdhesionForce2, + NagaiHondaDifferentialAdhesionForce3, + NagaiHondaForce2, + NagaiHondaForce3, + NoCellCycleModel, + NodeBasedCellPopulation2, + NodeBasedCellPopulation3, + NodeBasedCellPopulationWithBuskeUpdate2, + NodeBasedCellPopulationWithBuskeUpdate3, + NodeBasedCellPopulationWithParticles2, + NodeBasedCellPopulationWithParticles3, + NodeLocationWriter2_2, + NodeLocationWriter3_3, + NodeVelocityWriter2_2, + NodeVelocityWriter3_3, + NormallyDistributedTargetAreaModifier2, + NormallyDistributedTargetAreaModifier3, + NullSrnModel, + OffLatticeSimulation2_2, + OffLatticeSimulation3_3, + OnLatticeSimulation2, + OnLatticeSimulation3, + ParabolicBoxDomainPdeModifier2, + ParabolicBoxDomainPdeModifier3, + ParabolicGrowingDomainPdeModifier2, + ParabolicGrowingDomainPdeModifier3, + PlanarPolarisedFarhadifarForce2, + PlanarPolarisedFarhadifarForce3, + PlaneBasedCellKiller2, + PlaneBasedCellKiller3, + PlaneBoundaryCondition2_2, + PlaneBoundaryCondition3_3, + PottsBasedCellPopulation2, + PottsBasedCellPopulation3, + PottsMeshWriter2, + PottsMeshWriter3, + PythonSimulationModifier2, + PythonSimulationModifier3, + RadialCellDataDistributionWriter2_2, + RadialCellDataDistributionWriter3_3, + RandomCaSwitchingUpdateRule2, + RandomCaSwitchingUpdateRule3, + RandomCellKiller2, + RandomCellKiller3, + RandomDirectionCentreBasedDivisionRule2_2, + RandomDirectionCentreBasedDivisionRule3_3, + RandomDirectionVertexBasedDivisionRule2, + RandomDirectionVertexBasedDivisionRule3, + RepulsionForce2, + RepulsionForce3, + ShortAxisImmersedBoundaryDivisionRule2, + ShortAxisImmersedBoundaryDivisionRule3, + ShortAxisVertexBasedDivisionRule2, + ShortAxisVertexBasedDivisionRule3, + ShovingCaBasedDivisionRule2, + ShovingCaBasedDivisionRule3, + SimpleOxygenBasedCellCycleModel, + SimpleTargetAreaModifier2, + SimpleTargetAreaModifier3, + SimulationTime, + SlidingBoundaryCondition2, + SlidingBoundaryCondition3, + SphereGeometryBoundaryCondition2, + SphereGeometryBoundaryCondition3, + StemCellProliferativeType, + StochasticOxygenBasedCellCycleModel, + SurfaceAreaConstraintPottsUpdateRule2, + SurfaceAreaConstraintPottsUpdateRule3, + T2SwapCellKiller2, + T2SwapCellKiller3, + TargetAreaLinearGrowthModifier2, + TargetAreaLinearGrowthModifier3, + TargetedCellKiller2, + TargetedCellKiller3, + TransitCellProliferativeType, + TysonNovakCellCycleModel, + UniformCellCycleModel, + UniformG1GenerationalCellCycleModel, + UniformSourceEllipticPde2, + UniformSourceEllipticPde3, + UniformSourceParabolicPde2, + UniformSourceParabolicPde3, + VertexBasedCellPopulation2, + VertexBasedCellPopulation3, + VertexBasedPopulationSrn2, + VertexBasedPopulationSrn3, + VertexIntersectionSwapLocationsWriter2_2, + VertexIntersectionSwapLocationsWriter3_3, + VertexT1SwapLocationsWriter2_2, + VertexT1SwapLocationsWriter3_3, + VertexT2SwapLocationsWriter2_2, + VertexT2SwapLocationsWriter3_3, + VertexT3SwapLocationsWriter2_2, + VertexT3SwapLocationsWriter3_3, + VolumeConstraintPottsUpdateRule2, + VolumeConstraintPottsUpdateRule3, + VolumeDependentAveragedSourceEllipticPde2, + VolumeDependentAveragedSourceEllipticPde3, + VolumeTrackingModifier2, + VolumeTrackingModifier3, + VonMisesVertexBasedDivisionRule2, + VonMisesVertexBasedDivisionRule3, + VoronoiDataWriter2_2, + VoronoiDataWriter3_3, + VtkSceneModifier2, + VtkSceneModifier3, + WelikyOsterForce2, + WelikyOsterForce3, + WildTypeCellMutationState, + ) def test_core_imports(self): import chaste From 36564584b07fdce640aaa4566ac16b5646910020 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 11:54:51 +0000 Subject: [PATCH 46/53] #42 remove duplicate Edge wrappers --- .gitignore | 1 + dynamic/wrappers/cell_based/Edge2.cppwg.cpp | 103 -------------------- dynamic/wrappers/cell_based/Edge2.cppwg.hpp | 6 -- dynamic/wrappers/cell_based/Edge3.cppwg.cpp | 103 -------------------- dynamic/wrappers/cell_based/Edge3.cppwg.hpp | 6 -- test/python/TestImports.py | 3 - 6 files changed, 1 insertion(+), 221 deletions(-) delete mode 100644 dynamic/wrappers/cell_based/Edge2.cppwg.cpp delete mode 100644 dynamic/wrappers/cell_based/Edge2.cppwg.hpp delete mode 100644 dynamic/wrappers/cell_based/Edge3.cppwg.cpp delete mode 100644 dynamic/wrappers/cell_based/Edge3.cppwg.hpp diff --git a/.gitignore b/.gitignore index daf9c297..1feaab39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # No shared libraries and compiled Python *.so *.pyc +__pycache__/ # No eclipse settings *.project *.cproject diff --git a/dynamic/wrappers/cell_based/Edge2.cppwg.cpp b/dynamic/wrappers/cell_based/Edge2.cppwg.cpp deleted file mode 100644 index ae730c77..00000000 --- a/dynamic/wrappers/cell_based/Edge2.cppwg.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "PythonUblasObjectConverters.hpp" -#include "Edge.hpp" - -#include "Edge2.cppwg.hpp" - -namespace py = pybind11; -typedef Edge<2 > Edge2; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -void register_Edge2_class(py::module &m){ -py::class_ >(m, "Edge2") - .def(py::init(), py::arg("index")) - .def(py::init *, ::Node<2> * >(), py::arg("index"), py::arg("pNodeA"), py::arg("pNodeB")) - .def_static( - "GenerateMapIndex", - (::std::pair(*)(unsigned int, unsigned int)) &Edge2::GenerateMapIndex, - " " , py::arg("index1"), py::arg("index2") ) - .def( - "MarkAsDeleted", - (void(Edge2::*)()) &Edge2::MarkAsDeleted, - " " ) - .def( - "IsDeleted", - (bool(Edge2::*)()) &Edge2::IsDeleted, - " " ) - .def( - "SetIndex", - (void(Edge2::*)(unsigned int)) &Edge2::SetIndex, - " " , py::arg("index") ) - .def( - "GetIndex", - (unsigned int(Edge2::*)() const ) &Edge2::GetIndex, - " " ) - .def( - "GetMapIndex", - (::std::pair(Edge2::*)()) &Edge2::GetMapIndex, - " " ) - .def( - "RemoveNodes", - (void(Edge2::*)()) &Edge2::RemoveNodes, - " " ) - .def( - "SetNodes", - (void(Edge2::*)(::Node<2> *, ::Node<2> *)) &Edge2::SetNodes, - " " , py::arg("pNodeA"), py::arg("pNodeB") ) - .def( - "ReplaceNode", - (void(Edge2::*)(::Node<2> *, ::Node<2> *)) &Edge2::ReplaceNode, - " " , py::arg("pOldNode"), py::arg("pNewNode") ) - .def( - "GetNode", - (::Node<2> *(Edge2::*)(unsigned int) const ) &Edge2::GetNode, - " " , py::arg("index") , py::return_value_policy::reference) - .def( - "GetNumNodes", - (unsigned int(Edge2::*)()) &Edge2::GetNumNodes, - " " ) - .def( - "ContainsNode", - (bool(Edge2::*)(::Node<2> *) const ) &Edge2::ContainsNode, - " " , py::arg("pNode") ) - .def( - "rGetCentreLocation", - (::boost::numeric::ublas::c_vector(Edge2::*)()) &Edge2::rGetCentreLocation, - " " ) - .def( - "rGetLength", - (double(Edge2::*)()) &Edge2::rGetLength, - " " ) - .def( - "GetOtherElements", - (::std::set(Edge2::*)(unsigned int)) &Edge2::GetOtherElements, - " " , py::arg("elementIndex") ) - .def( - "AddElement", - (void(Edge2::*)(unsigned int)) &Edge2::AddElement, - " " , py::arg("elementIndex") ) - .def( - "RemoveElement", - (void(Edge2::*)(unsigned int)) &Edge2::RemoveElement, - " " , py::arg("elementIndex") ) - .def( - "GetNeighbouringElementIndices", - (::std::set(Edge2::*)()) &Edge2::GetNeighbouringElementIndices, - " " ) - .def( - "GetNumElements", - (unsigned int(Edge2::*)()) &Edge2::GetNumElements, - " " ) - .def( - "IsBoundaryEdge", - (bool(Edge2::*)() const ) &Edge2::IsBoundaryEdge, - " " ) - ; -} diff --git a/dynamic/wrappers/cell_based/Edge2.cppwg.hpp b/dynamic/wrappers/cell_based/Edge2.cppwg.hpp deleted file mode 100644 index be984b6b..00000000 --- a/dynamic/wrappers/cell_based/Edge2.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef Edge2_hpp__pyplusplus_wrapper -#define Edge2_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_Edge2_class(py::module &m); -#endif // Edge2_hpp__pyplusplus_wrapper diff --git a/dynamic/wrappers/cell_based/Edge3.cppwg.cpp b/dynamic/wrappers/cell_based/Edge3.cppwg.cpp deleted file mode 100644 index d338e934..00000000 --- a/dynamic/wrappers/cell_based/Edge3.cppwg.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "PythonUblasObjectConverters.hpp" -#include "Edge.hpp" - -#include "Edge3.cppwg.hpp" - -namespace py = pybind11; -typedef Edge<3 > Edge3; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -void register_Edge3_class(py::module &m){ -py::class_ >(m, "Edge3") - .def(py::init(), py::arg("index")) - .def(py::init *, ::Node<3> * >(), py::arg("index"), py::arg("pNodeA"), py::arg("pNodeB")) - .def_static( - "GenerateMapIndex", - (::std::pair(*)(unsigned int, unsigned int)) &Edge3::GenerateMapIndex, - " " , py::arg("index1"), py::arg("index2") ) - .def( - "MarkAsDeleted", - (void(Edge3::*)()) &Edge3::MarkAsDeleted, - " " ) - .def( - "IsDeleted", - (bool(Edge3::*)()) &Edge3::IsDeleted, - " " ) - .def( - "SetIndex", - (void(Edge3::*)(unsigned int)) &Edge3::SetIndex, - " " , py::arg("index") ) - .def( - "GetIndex", - (unsigned int(Edge3::*)() const ) &Edge3::GetIndex, - " " ) - .def( - "GetMapIndex", - (::std::pair(Edge3::*)()) &Edge3::GetMapIndex, - " " ) - .def( - "RemoveNodes", - (void(Edge3::*)()) &Edge3::RemoveNodes, - " " ) - .def( - "SetNodes", - (void(Edge3::*)(::Node<3> *, ::Node<3> *)) &Edge3::SetNodes, - " " , py::arg("pNodeA"), py::arg("pNodeB") ) - .def( - "ReplaceNode", - (void(Edge3::*)(::Node<3> *, ::Node<3> *)) &Edge3::ReplaceNode, - " " , py::arg("pOldNode"), py::arg("pNewNode") ) - .def( - "GetNode", - (::Node<3> *(Edge3::*)(unsigned int) const ) &Edge3::GetNode, - " " , py::arg("index") , py::return_value_policy::reference) - .def( - "GetNumNodes", - (unsigned int(Edge3::*)()) &Edge3::GetNumNodes, - " " ) - .def( - "ContainsNode", - (bool(Edge3::*)(::Node<3> *) const ) &Edge3::ContainsNode, - " " , py::arg("pNode") ) - .def( - "rGetCentreLocation", - (::boost::numeric::ublas::c_vector(Edge3::*)()) &Edge3::rGetCentreLocation, - " " ) - .def( - "rGetLength", - (double(Edge3::*)()) &Edge3::rGetLength, - " " ) - .def( - "GetOtherElements", - (::std::set(Edge3::*)(unsigned int)) &Edge3::GetOtherElements, - " " , py::arg("elementIndex") ) - .def( - "AddElement", - (void(Edge3::*)(unsigned int)) &Edge3::AddElement, - " " , py::arg("elementIndex") ) - .def( - "RemoveElement", - (void(Edge3::*)(unsigned int)) &Edge3::RemoveElement, - " " , py::arg("elementIndex") ) - .def( - "GetNeighbouringElementIndices", - (::std::set(Edge3::*)()) &Edge3::GetNeighbouringElementIndices, - " " ) - .def( - "GetNumElements", - (unsigned int(Edge3::*)()) &Edge3::GetNumElements, - " " ) - .def( - "IsBoundaryEdge", - (bool(Edge3::*)() const ) &Edge3::IsBoundaryEdge, - " " ) - ; -} diff --git a/dynamic/wrappers/cell_based/Edge3.cppwg.hpp b/dynamic/wrappers/cell_based/Edge3.cppwg.hpp deleted file mode 100644 index 0479d864..00000000 --- a/dynamic/wrappers/cell_based/Edge3.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef Edge3_hpp__pyplusplus_wrapper -#define Edge3_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_Edge3_class(py::module &m); -#endif // Edge3_hpp__pyplusplus_wrapper diff --git a/test/python/TestImports.py b/test/python/TestImports.py index 14b9fe0f..10862c0b 100644 --- a/test/python/TestImports.py +++ b/test/python/TestImports.py @@ -260,9 +260,6 @@ def test_cell_based_imports(self): DiffusionForce3, DivisionBiasTrackingModifier2, DivisionBiasTrackingModifier3, - Edge2, - Edge3, - EdgeOperation, EllipticBoxDomainPdeModifier2, EllipticBoxDomainPdeModifier3, EllipticGrowingDomainPdeModifier2, From cf0f90f6f1f716e986c369f935e470e3b8e6abe9 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 11:59:04 +0000 Subject: [PATCH 47/53] #42 remove duplicate EdgeOperation wrappers --- .../cell_based/EdgeOperation.cppwg.cpp | 55 ------------------- .../cell_based/EdgeOperation.cppwg.hpp | 6 -- 2 files changed, 61 deletions(-) delete mode 100644 dynamic/wrappers/cell_based/EdgeOperation.cppwg.cpp delete mode 100644 dynamic/wrappers/cell_based/EdgeOperation.cppwg.hpp diff --git a/dynamic/wrappers/cell_based/EdgeOperation.cppwg.cpp b/dynamic/wrappers/cell_based/EdgeOperation.cppwg.cpp deleted file mode 100644 index 354032a8..00000000 --- a/dynamic/wrappers/cell_based/EdgeOperation.cppwg.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "SmartPointers.hpp" -#include "UblasIncludes.hpp" -#include "EdgeOperation.hpp" - -#include "EdgeOperation.cppwg.hpp" - -namespace py = pybind11; -typedef EdgeOperation EdgeOperation; -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - -void register_EdgeOperation_class(py::module &m){ -py::class_ >(m, "EdgeOperation") - .def(py::init< >()) - .def(py::init<::EDGE_OPERATION, unsigned int, ::EdgeRemapInfo, bool const >(), py::arg("operation"), py::arg("elementIndex"), py::arg("remapInfo"), py::arg("isIndexRemapped") = false) - .def(py::init(), py::arg("elementIndex"), py::arg("elementIndex2"), py::arg("remapInfo"), py::arg("remapInfo2")) - .def( - "GetOperation", - (::EDGE_OPERATION(EdgeOperation::*)() const ) &EdgeOperation::GetOperation, - " " ) - .def( - "GetElementIndex", - (unsigned int(EdgeOperation::*)() const ) &EdgeOperation::GetElementIndex, - " " ) - .def( - "SetElementIndex", - (void(EdgeOperation::*)(unsigned int const)) &EdgeOperation::SetElementIndex, - " " , py::arg("index") ) - .def( - "GetElementIndex2", - (unsigned int(EdgeOperation::*)() const ) &EdgeOperation::GetElementIndex2, - " " ) - .def( - "SetElementIndex2", - (void(EdgeOperation::*)(unsigned int const)) &EdgeOperation::SetElementIndex2, - " " , py::arg("index") ) - .def( - "rGetRemapInfo", - (::EdgeRemapInfo const &(EdgeOperation::*)() const ) &EdgeOperation::rGetRemapInfo, - " " , py::return_value_policy::reference_internal) - .def( - "rGetRemapInfo2", - (::EdgeRemapInfo const &(EdgeOperation::*)() const ) &EdgeOperation::rGetRemapInfo2, - " " , py::return_value_policy::reference_internal) - .def( - "IsElementIndexRemapped", - (bool(EdgeOperation::*)() const ) &EdgeOperation::IsElementIndexRemapped, - " " ) - ; -} diff --git a/dynamic/wrappers/cell_based/EdgeOperation.cppwg.hpp b/dynamic/wrappers/cell_based/EdgeOperation.cppwg.hpp deleted file mode 100644 index 7f343101..00000000 --- a/dynamic/wrappers/cell_based/EdgeOperation.cppwg.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef EdgeOperation_hpp__pyplusplus_wrapper -#define EdgeOperation_hpp__pyplusplus_wrapper - -namespace py = pybind11; -void register_EdgeOperation_class(py::module &m); -#endif // EdgeOperation_hpp__pyplusplus_wrapper From 54ce6b5538c89643d5a856fced19f3d5932627f0 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 15:40:45 +0000 Subject: [PATCH 48/53] #42 Update READMEs --- README.md | 13 +++-- infra/conda/README.md | 113 ++++++++++++++++++++++++++++++------------ src/python/README.md | 18 ------- 3 files changed, 90 insertions(+), 54 deletions(-) delete mode 100644 src/python/README.md diff --git a/README.md b/README.md index baec6cd7..b4305920 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,21 @@ # PyChaste -PyChaste is a Python wrapper for [Chaste](https://chaste.github.io/), a general purpose simulation package for computational biology. +PyChaste is a Python wrapper for [Chaste](https://chaste.github.io/), a general +purpose simulation package for computational biology. + +Currently a limited number of features are supported, mostly related to +cell-based Chaste. ## Installation `mamba install -c pychaste -c conda-forge chaste` -See the [website](https://chaste.github.io/pychaste/installation/) for a detailed guide on installing PyChaste. +See the [website](https://chaste.github.io/pychaste/installation/) for a +detailed guide on installing PyChaste. ## Tutorials -See the [website](https://chaste.github.io/pychaste/tutorials/) for tutorials demonstrating how to use PyChaste. +See the [website](https://chaste.github.io/pychaste/tutorials/) for tutorials +demonstrating how to use PyChaste. ## Extending See the [wiki](../../wiki/) for guidance on extending PyChaste. + diff --git a/infra/conda/README.md b/infra/conda/README.md index cfb2b717..eaa753e1 100644 --- a/infra/conda/README.md +++ b/infra/conda/README.md @@ -1,56 +1,103 @@ -# How to build the conda package +# PyChaste conda packages -The `chaste` conda package is on the channel`jmsgrogan` on the anaconda cloud. -This directory contains build scripts for the package and all neccessary dependency packages. -Assuming conda has been suitably set up, each package can be re-built by doing: +The [pychaste](https://anaconda.org/pychaste) channel on the anaconda cloud +hosts the `chaste` conda package and required dependency packages for `vtk` and +`xsd`. Other dependencies such as `petsc` and `sundials` are installed from +[conda-forge](https://anaconda.org/conda-forge). + +## How to build the conda packages + +This directory contains build scripts for the conda packages on the +[pychaste](https://anaconda.org/pychaste) channel. Assuming +[mamba](https://mamba.readthedocs.io) and +[docker](https://docs.docker.com/get-docker/) have been installed, the conda +packages can be built with the instructions below. + +### Building the Linux conda packages + +The following lines launch a docker container to build the package. + +A list of `yaml` files containing settings for package variants can be found in +the `variants` folder of each package. The variant name is the name of the file +without the `.yaml` extenstion. For example, one of the variants for the `vtk` +package is `linux_64_python3.8_cpython`. + +The `parallel` argument optionally specifies the maximum number of processes to +use for the build. ```bash -cd -conda build . +cd /path/to/PyChaste/infra/conda// + +docker run -it --rm \ + -v $(pwd):/home/conda \ + -e HOST_USER_ID="$(id -u)" \ + quay.io/condaforge/linux-anvil-cos7-x86_64 \ + ./build-package.sh --variant= --parallel=4 ``` -If you are happy with the package it can be uploaded to the anaconda cloud channel by doing: +After the build is complete, you can verify that the package has been created: ```bash -anaconda upload +ls ./build_artifacts/linux-64 ``` -where `` will be shown in the console after a successful build. -Additional steps are needed for the `chaste` package, detailed below. - -## Preparing conda for the build +There should be a `--.tar.bz2` file in the +directory. -To set up conda for the build do: +To do a test installation of the freshly built package, you can install the +local package in a new conda environment. For example: ```bash -wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -chmod 777 Miniconda2-latest-Linux-x86_64.sh -./Miniconda2-latest-Linux-x86_64.sh -conda update conda -conda install conda-build -conda install anaconda-client -conda config --add channels conda-forge -conda config --add channels jmsgrogan +conda create -n py38-env python=3.8 +conda activate py38-env +conda install -c ./build_artifacts ``` -## Preparing Chaste for the build. - -* Set the path to source: while most packages are automatically grabbed from their version control systems the path to the Chaste source must be manually specified in `chaste/meta.yaml` relative to this directory. - -## Working with the package +You can start a python session to import and use the package. If you are happy +with the package, it can be uploaded to the anaconda cloud. This requires +creating an anaconda account and installing the anaconda client: ```bash -conda install chaste +conda install anaconda-client ``` -then in a python session: +To login to the anaconda cloud and upload the package: -```python -import chaste +```bash +anaconda login +anaconda upload -u '' /path/to/package.tar.bz2 ``` -## Troubleshooting +## Updating the conda package recipes + +For each of the packages, the directory containing the build scripts roughly +follows this structure: -* Missing librt.so: this is a problem with the version of VTK in conda-forge, make sure VTK is being pulled from the jmsgrogan channel. -* Missing liblapack.so when loading the package in Python after building: libatlas is needed on the system. Do `sudo apt-get install libatlas-base-dev` on Ubuntu, for example. +``` +├── build-package.sh +├── recipe +│   ├── build.sh +│   └── meta.yaml +└── variants + ├── .yaml + ├── .yaml + └── .yaml +``` +- `build-package.sh`: This script sets up the environment for the build and then + calls `conda mambabuild` to build the conda package. +- `recipe/build.sh`: This script is used by `conda mambabuild` to build the + source code. Typically, this performs the "configure" and "make" steps. See + the + [conda-build docs](https://docs.conda.io/projects/conda-build/en/latest/resources/build-scripts.html) + for more details on conda build scripts. +- `recipe/meta.yaml`: This contains metadata used by the `conda mambabuild` + process, including build dependencies. For more information, see the + [conda-build docs](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html). +- `variants`: This contains metadata for different variants of the build. For + example, a package might need to be built with different versions of Python, + which may require specifying slightly different versions of pre-build + dependencies from conda-forge. The metadata for the variant is merged with + `recipe/meta.yaml` during the package build. For further information on build + variants, see the [conda-build + docs](https://docs.conda.io/projects/conda-build/en/stable/resources/variants.html). diff --git a/src/python/README.md b/src/python/README.md deleted file mode 100644 index 03d54277..00000000 --- a/src/python/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# PyChaste - -This is an unofficial collection of Python bindings for [Chaste](http://www.cs.ox.ac.uk/chaste/). Currently a limited number of -features are supported, mostly related to Cell Based Chaste. - -# Features - -* On- and off-lattice agent based cell modelling -* Visualization using VTK - -See the [project wiki](https://github.com/jmsgrogan/PyChaste/wiki) for some sample applications. Further examples based on the [Chaste User Tutorials](https://chaste.cs.ox.ac.uk/trac/wiki/UserTutorials) are under development. - -# To use - -``` -import chaste -chaste.init() -``` \ No newline at end of file From 5d26d357664e5e5a41217249083c05d6044f1424 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 19:51:32 +0000 Subject: [PATCH 49/53] #42 update vtk variants --- .../7.1/variants/linux_64_python3.10_cpython.yaml | 2 +- .../7.1/variants/linux_64_python3.11_cpython.yaml | 14 ++++++++------ .../7.1/variants/linux_64_python3.12_cpython.yaml | 14 ++++++++------ .../7.1/variants/linux_64_python3.8_cpython.yaml | 14 ++++++++------ .../7.1/variants/linux_64_python3.9_cpython.yaml | 14 +++++++------- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml index 278b8a3a..0b240c28 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.10_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - "1.68" + - "1.74" cdt_name: - cos7 channel_sources: diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml index b4d15bf1..960496dc 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.11_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -14,15 +14,15 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 expat: - - "2" + - "2.6" fortran_compiler: - gfortran fortran_compiler_version: - "11" freetype: - - "2" + - "2.12" hdf5: - - ">=1.10,<1.14" + - "1.12" jpeg: - "9" jsoncpp: @@ -30,11 +30,13 @@ jsoncpp: libpng: - "1.6" libtiff: - - "4" + - "4.5" libxml2: - "2" mpich: - - ">=3" + - "4" +petsc: + - "3.18" pin_run_as_build: python: min_pin: x.x diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml index 32f50c13..89e34a86 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.12_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.78" cdt_name: - cos7 channel_sources: @@ -14,15 +14,15 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 expat: - - "2" + - "2.6" fortran_compiler: - gfortran fortran_compiler_version: - "11" freetype: - - "2" + - "2.12" hdf5: - - ">=1.10,<1.14" + - "1.12" jpeg: - "9" jsoncpp: @@ -30,11 +30,13 @@ jsoncpp: libpng: - "1.6" libtiff: - - "4" + - "4.5" libxml2: - "2" mpich: - - ">=3" + - "4" +petsc: + - "3.18" pin_run_as_build: python: min_pin: x.x diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml index b01c7448..a5f7bfd8 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.8_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -14,15 +14,15 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 expat: - - "2" + - "2.6" fortran_compiler: - gfortran fortran_compiler_version: - "11" freetype: - - "2" + - "2.12" hdf5: - - ">=1.10,<1.14" + - "1.12" jpeg: - "9" jsoncpp: @@ -30,11 +30,13 @@ jsoncpp: libpng: - "1.6" libtiff: - - "4" + - "4.5" libxml2: - "2" mpich: - - ">=3" + - "4" +petsc: + - "3.18" pin_run_as_build: python: min_pin: x.x diff --git a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml index b4d53515..b79546bb 100644 --- a/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/vtk/7.1/variants/linux_64_python3.9_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -14,15 +14,15 @@ cxx_compiler_version: docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 expat: - - "2" + - "2.6" fortran_compiler: - gfortran fortran_compiler_version: - "11" freetype: - - "2" + - "2.12" hdf5: - - ">=1.10,<1.14" + - "1.12" jpeg: - "9" jsoncpp: @@ -30,13 +30,13 @@ jsoncpp: libpng: - "1.6" libtiff: - - "4" + - "4.5" libxml2: - "2" mpich: - - ">=3" + - "4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: python: min_pin: x.x From 38d1cabb78c11a01a41fcfc165f6317315774552 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 19:52:28 +0000 Subject: [PATCH 50/53] #42 update chaste conda variants --- .../variants/linux_64_python3.10_cpython.yaml | 22 ++++++++++++++----- .../variants/linux_64_python3.11_cpython.yaml | 22 ++++++++++++++----- .../variants/linux_64_python3.12_cpython.yaml | 22 ++++++++++++++----- .../variants/linux_64_python3.8_cpython.yaml | 22 ++++++++++++++----- .../variants/linux_64_python3.9_cpython.yaml | 8 +++---- 5 files changed, 72 insertions(+), 24 deletions(-) diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml index 55ae2d0f..440596c0 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.10_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -18,19 +18,31 @@ fortran_compiler: fortran_compiler_version: - "11" hdf5: - - ">=1.10,<1.14" + - "1.12" metis: - ">=4" mpich: - - ">=3" + - "4" parmetis: - ">=4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: + boostcpp: + min_pin: x.x + max_pin: x.x + petsc: + min_pin: x.x + max_pin: x.x python: min_pin: x.x max_pin: x.x + sundials: + min_pin: x.x + max_pin: x.x + vtk: + min_pin: x.x + max_pin: x.x python: - 3.10.* *_cpython sundials: @@ -38,7 +50,7 @@ sundials: vtk: - "7.1.1" xercesc: - - ">=3" + - "3" target_platform: - linux-64 zip_keys: diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml index 868bd409..cee71711 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.11_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -18,19 +18,31 @@ fortran_compiler: fortran_compiler_version: - "11" hdf5: - - ">=1.10,<1.14" + - "1.12" metis: - ">=4" mpich: - - ">=3" + - "4" parmetis: - ">=4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: + boostcpp: + min_pin: x.x + max_pin: x.x + petsc: + min_pin: x.x + max_pin: x.x python: min_pin: x.x max_pin: x.x + sundials: + min_pin: x.x + max_pin: x.x + vtk: + min_pin: x.x + max_pin: x.x python: - 3.11.* *_cpython sundials: @@ -38,7 +50,7 @@ sundials: vtk: - "7.1.1" xercesc: - - ">=3" + - "3" target_platform: - linux-64 zip_keys: diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml index 5edb9418..e1ea73b4 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.12_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -18,19 +18,31 @@ fortran_compiler: fortran_compiler_version: - "11" hdf5: - - ">=1.10,<1.14" + - "1.12" metis: - ">=4" mpich: - - ">=3" + - "4" parmetis: - ">=4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: + boostcpp: + min_pin: x.x + max_pin: x.x + petsc: + min_pin: x.x + max_pin: x.x python: min_pin: x.x max_pin: x.x + sundials: + min_pin: x.x + max_pin: x.x + vtk: + min_pin: x.x + max_pin: x.x python: - 3.12.* *_cpython sundials: @@ -38,7 +50,7 @@ sundials: vtk: - "7.1.1" xercesc: - - ">=3" + - "3" target_platform: - linux-64 zip_keys: diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml index 785f1ffe..199187b0 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.8_cpython.yaml @@ -1,5 +1,5 @@ boostcpp: - - ">=1.68,<1.76" + - "1.74" cdt_name: - cos7 channel_sources: @@ -18,19 +18,31 @@ fortran_compiler: fortran_compiler_version: - "11" hdf5: - - ">=1.10,<1.14" + - "1.12" metis: - ">=4" mpich: - - ">=3" + - "4" parmetis: - ">=4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: + boostcpp: + min_pin: x.x + max_pin: x.x + petsc: + min_pin: x.x + max_pin: x.x python: min_pin: x.x max_pin: x.x + sundials: + min_pin: x.x + max_pin: x.x + vtk: + min_pin: x.x + max_pin: x.x python: - 3.8.* *_cpython sundials: @@ -38,7 +50,7 @@ sundials: vtk: - "7.1.1" xercesc: - - ">=3" + - "3" target_platform: - linux-64 zip_keys: diff --git a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml index 89ab7c4d..a64f9045 100755 --- a/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml +++ b/infra/conda/chaste/2024.1/variants/linux_64_python3.9_cpython.yaml @@ -18,15 +18,15 @@ fortran_compiler: fortran_compiler_version: - "11" hdf5: - - ">=1.10,<1.14" + - "1.12" metis: - ">=4" mpich: - - ">=3" + - "4" parmetis: - ">=4" petsc: - - ">=3.12,<3.19" + - "3.18" pin_run_as_build: boostcpp: min_pin: x.x @@ -50,7 +50,7 @@ sundials: vtk: - "7.1.1" xercesc: - - ">=3" + - "3" target_platform: - linux-64 zip_keys: From 78897b3ed5524a042eb81c5a56b844f2c8026323 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 19:53:31 +0000 Subject: [PATCH 51/53] #42 update py versions in setup.py --- src/python/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/setup.py b/src/python/setup.py index 7e1df15a..f640364a 100644 --- a/src/python/setup.py +++ b/src/python/setup.py @@ -83,7 +83,6 @@ def has_ext_modules(self): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", ], From 6af5abdffa2875b0331cbfdfcf4f1f1a41ad09a3 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 19:56:43 +0000 Subject: [PATCH 52/53] #42 update conda build action --- .github/workflows/conda-build-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build-linux.yml b/.github/workflows/conda-build-linux.yml index cec228c1..01341eb6 100644 --- a/.github/workflows/conda-build-linux.yml +++ b/.github/workflows/conda-build-linux.yml @@ -23,7 +23,7 @@ jobs: quay.io/condaforge/linux-anvil-cos7-x86_64 ./build-package.sh \ --variant=${{ github.event.inputs.variant }} \ --parallel=$(nproc) - working-directory: infra/conda/chaste + working-directory: infra/conda/chaste/2024.1 - name: upload conda package artifacts uses: actions/upload-artifact@v4 From 940f4b54b288f0fe94288f7e41025ff2625f0840 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Fri, 19 Apr 2024 20:54:57 +0000 Subject: [PATCH 53/53] #42 test conda install for py3.8-3.11 --- .github/workflows/test-conda.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-conda.yml b/.github/workflows/test-conda.yml index 6efaab63..7fe51fc2 100644 --- a/.github/workflows/test-conda.yml +++ b/.github/workflows/test-conda.yml @@ -9,6 +9,11 @@ jobs: test-conda: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + steps: - name: install dependencies run: | @@ -22,7 +27,7 @@ jobs: use-mamba: true miniforge-variant: Mambaforge miniforge-version: latest - python-version: "3.10" + python-version: ${{ matrix.python-version }} activate-environment: pychaste_test channels: pychaste,conda-forge