From 865c3b390641a27ecc8a132ca7bad543756f871f Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 14:30:20 +0000 Subject: ADD: variants, list of files in exported variable REG_FILES --- Wrappers/Python/conda-recipe/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Wrappers/Python') diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index 808493e..e3258ff 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -1,8 +1,7 @@ package: name: ccpi-regulariser - version: 0.10.3 - - + version: {{CIL_VERSION}} + build: preserve_egg_dir: False number: 0 @@ -16,7 +15,7 @@ test: requirements: build: - python - - numpy x.x + - numpy {{ numpy }} - setuptools - cython - vc 14 # [win and py36] @@ -25,8 +24,9 @@ requirements: - cmake run: + - {{ pin_compatible('numpy', max_pin='x.x') }} - python - - numpy x.x + - numpy - vc 14 # [win and py36] - vc 14 # [win and py35] - vc 9 # [win and py27] -- cgit v1.2.3 From ca5c4e281d0b103ebc544a096b5ac90dd74eb215 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 15:34:17 +0000 Subject: ADD: variants --- Wrappers/Python/conda-recipe/conda_build_config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Wrappers/Python/conda-recipe/conda_build_config.yaml (limited to 'Wrappers/Python') diff --git a/Wrappers/Python/conda-recipe/conda_build_config.yaml b/Wrappers/Python/conda-recipe/conda_build_config.yaml new file mode 100644 index 0000000..b7977f3 --- /dev/null +++ b/Wrappers/Python/conda-recipe/conda_build_config.yaml @@ -0,0 +1,7 @@ +python: + - 2.7 # [not win] + - 3.5 + - 3.6 +numpy: + - 1.12 + - 1.15 -- cgit v1.2.3 From 5e436eab5cea50569df9c85159be69d8e88688f0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 16:41:10 +0000 Subject: UPDATE: propagate CIL_VERSION --- CMakeLists.txt | 3 ++- Core/CMakeLists.txt | 2 +- Wrappers/Python/CMakeLists.txt | 2 +- Wrappers/Python/conda-recipe/build.sh | 1 + Wrappers/Python/conda-recipe/meta.yaml | 2 ++ recipes/regularisers/bld.bat | 2 +- recipes/regularisers/build.sh | 4 ++-- 7 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Wrappers/Python') diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e59e9..b95107a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,9 @@ set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) # set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) -# get CIL_VERSION from environment variable +# get CIL_VERSION from environment variable and set it in cmake set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +message(STATUS "CIL_VERSION set to " ${CIL_VERSION}) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index d92db82..b3c0dfb 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -6,7 +6,7 @@ project(RGL_core) # The version number. -#set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build message("CIL_VERSION ${CIL_VERSION}") diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index d86d0ea..c2ef855 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -9,7 +9,7 @@ project(regulariserPython) #set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build -message("CIL_VERSION ${CIL_VERSION}") +message("CIL_VERSION: ${CIL_VERSION}") #include (GenerateExportHeader) find_package(PythonInterp REQUIRED) diff --git a/Wrappers/Python/conda-recipe/build.sh b/Wrappers/Python/conda-recipe/build.sh index eec7c2f..39c0f2c 100644 --- a/Wrappers/Python/conda-recipe/build.sh +++ b/Wrappers/Python/conda-recipe/build.sh @@ -5,6 +5,7 @@ cp -rv "$RECIPE_DIR/../../../Core" "$SRC_DIR/Core" cd $SRC_DIR ##cuda=off + cmake -G "Unix Makefiles" $RECIPE_DIR/../../../ -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=$CONDA_PREFIX/lib -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index e3258ff..9fe813d 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -5,6 +5,8 @@ package: build: preserve_egg_dir: False number: 0 + script_env: + - CIL_VERSION test: files: diff --git a/recipes/regularisers/bld.bat b/recipes/regularisers/bld.bat index 43a5286..63e7681 100644 --- a/recipes/regularisers/bld.bat +++ b/recipes/regularisers/bld.bat @@ -10,7 +10,7 @@ cd "%SRC_DIR%\build" echo "we should be in %SRC_DIR%\build" -cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF +cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DCIL_VERSION="%CIL_VERSION%" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF ::-DBOOST_LIBRARYDIR="%CONDA_PREFIX%\Library\lib" -DBOOST_INCLUDEDIR="%CONDA_PREFIX%\Library\include" -DBOOST_ROOT="%CONDA_PREFIX%\Library\lib" diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index 0b8bce2..aede303 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -echo $CIL_VERSION +echo build.sh CIL_VERSION: $CIL_VERSION #if [ -z "$CIL_VERSION" ]; then # echo "Need to set CIL_VERSION" # exit 1 @@ -13,7 +13,7 @@ mkdir ${SRC_DIR}/build cp -rv ${RECIPE_DIR}/../../Core/ ${SRC_DIR}/build mkdir ${SRC_DIR}/build/build cd ${SRC_DIR}/build/build -cmake -G "Unix Makefiles" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core +cmake -G "Unix Makefiles" -DCIL_VERSION="${CIL_VERSION}" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core make -j2 VERBOSE=1 make install -- cgit v1.2.3 From 2694ad1b18d14fcfd7d57ded7290ebd1bf845fda Mon Sep 17 00:00:00 2001 From: Kazantsev Date: Wed, 23 Jan 2019 11:52:40 +0000 Subject: fixes gpu build on windows --- Core/regularisers_GPU/TV_FGP_GPU_core.h | 9 ++++----- Core/regularisers_GPU/TV_SB_GPU_core.h | 10 +++++----- Core/regularisers_GPU/dTV_FGP_GPU_core.h | 9 ++++----- Wrappers/Python/conda-recipe/meta.yaml | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) (limited to 'Wrappers/Python') diff --git a/Core/regularisers_GPU/TV_FGP_GPU_core.h b/Core/regularisers_GPU/TV_FGP_GPU_core.h index b28cdf3..bf13508 100755 --- a/Core/regularisers_GPU/TV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/TV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include -#include -#include - #ifndef _TV_FGP_GPU_ #define _TV_FGP_GPU_ -extern "C" int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + +extern "C" CCPI_EXPORT int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/TV_SB_GPU_core.h b/Core/regularisers_GPU/TV_SB_GPU_core.h index d44ab77..901b90f 100755 --- a/Core/regularisers_GPU/TV_SB_GPU_core.h +++ b/Core/regularisers_GPU/TV_SB_GPU_core.h @@ -1,10 +1,10 @@ -#include -#include -#include - #ifndef _SB_TV_GPU_ #define _SB_TV_GPU_ -extern "C" int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + + +extern "C" CCPI_EXPORT int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/dTV_FGP_GPU_core.h b/Core/regularisers_GPU/dTV_FGP_GPU_core.h index 9020b1a..f9281e8 100644 --- a/Core/regularisers_GPU/dTV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/dTV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include -#include -#include - #ifndef _dTV_FGP_GPU_ #define _dTV_FGP_GPU_ -extern "C" int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + +extern "C" CCPI_EXPORT int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index 9fe813d..9dd5544 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -12,7 +12,7 @@ test: files: - lena_gray_512.tif requires: - - pillow + - pillow=4.1.1 requirements: build: -- cgit v1.2.3