Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Update to 0.10.0 and improvements from conda-forge pull requests #701

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions python/simpleitk/bld.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
mkdir C:\b
cd C:\b

set "CMAKE_GENERATOR=Visual Studio 9 2008"
if "%PY_VER%" == "3.3" set "CMAKE_GENERATOR=Visual Studio 10"
if "%PY_VER%" == "3.4" set "CMAKE_GENERATOR=Visual Studio 10"
if "%PY_VER%" == "3.5" set "CMAKE_GENERATOR=Visual Studio 14"

if "%ARCH%" == "64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"

REM Remove dot from PY_VER for use in library name
set MY_PY_VER=%PY_VER:.=%

Expand All @@ -25,10 +18,11 @@ cmake -G "%CMAKE_GENERATOR%" ^
-D WRAP_TCL:BOOL=OFF ^
-D WRAP_R:BOOL=OFF ^
-D WRAP_RUBY:BOOL=OFF ^
-D ITK_USE_SYSTEM_JPEG:BOOL=OFF ^
-D ITK_USE_SYSTEM_PNG:BOOL=OFF ^
-D ITK_USE_SYSTEM_TIFF:BOOL=OFF ^
-D ITK_USE_SYSTEM_ZLIB:BOOL=OFF ^
-D USE_SYSTEM_SWIG:BOOL=ON ^
-D ITK_USE_SYSTEM_JPEG:BOOL=ON ^
-D ITK_USE_SYSTEM_PNG:BOOL=ON ^
-D ITK_USE_SYSTEM_TIFF:BOOL=ON ^
-D ITK_USE_SYSTEM_ZLIB:BOOL=ON ^
-D "CMAKE_SYSTEM_PREFIX_PATH:PATH=%PREFIX%/Library" ^
-D "PYTHON_EXECUTABLE:FILEPATH=%PYTHON%" ^
-D "PYTHON_INCLUDE_DIR:PATH=%PREFIX%/include" ^
Expand All @@ -45,5 +39,5 @@ REM Install step
REM cmake --build . --config Release --target INSTALL
if errorlevel 1 exit 1

cd SimpleITK-build\Wrapping
%PYTHON% PythonPackage\setup.py install
cd SimpleITK-build\Wrapping\Python
%PYTHON% Packaging\setup.py install
12 changes: 7 additions & 5 deletions python/simpleitk/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu || 1)

if [ `uname` == Darwin ]; then
SO_EXT='dylib'
CMAKE_ARGS="-D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=${MACOSX_DEPLOYMENT_TARGET}"
else
SO_EXT='so'
fi
Expand All @@ -16,11 +18,11 @@ if [ $PY3K -eq "1" ]; then
MY_PY_VER="${MY_PY_VER}m"
fi


cmake \
-D "CMAKE_CXX_FLAGS:STRING=-fvisibility=hidden -fvisibility-inlines-hidden ${CFLAGS}" \
-D "CMAKE_C_FLAGS:STRING=-fvisibility=hidden ${CXXFLAGS}" \
-D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=${MACOSX_DEPLOYMENT_TARGET} \
${CMAKE_ARGS} \
-D SITK_GIT_PROTOCOL_default:STRING=git \
-D SimpleITK_BUILD_DISTRIBUTE:BOOL=ON \
-D SimpleITK_BUILD_STRIP:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
Expand All @@ -39,14 +41,14 @@ cmake \
-D ITK_USE_SYSTEM_PNG:BOOL=ON \
-D ITK_USE_SYSTEM_TIFF:BOOL=ON \
-D ITK_USE_SYSTEM_ZLIB:BOOL=ON \
-D USE_SYSTEM_SWIG:BOOL=ON \
-D "CMAKE_SYSTEM_PREFIX_PATH:FILEPATH=${PREFIX}" \
-D "PYTHON_EXECUTABLE:FILEPATH=${PYTHON}" \
-D "PYTHON_INCLUDE_DIR:PATH=$PREFIX/include/python${MY_PY_VER}" \
-D "PYTHON_LIBRARY:FILEPATH=$PREFIX/lib/libpython${MY_PY_VER}.${SO_EXT}" \
"${SRC_DIR}/SuperBuild"

make -j ${CORES}
cd ${BUILD_DIR}/SimpleITK-build/Wrapping
${PYTHON} PythonPackage/setup.py install

cd ${BUILD_DIR}/SimpleITK-build/Wrapping/Python
${PYTHON} Packaging/setup.py install

33 changes: 22 additions & 11 deletions python/simpleitk/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
{% set version = "0.10.0" %}

package:
name: simpleitk
version: "0.9.1"
version: "{{version}}"

source:
git_url: http://itk.org/SimpleITK.git
git_tag: v0.9.1
git_tag: v{{version}}

build:
number: 0

requirements:
build:
- swig
- python
- cmake >=2.8.11 # [not win]
- libtiff 4.0.* # [not win]
- libpng 1.6.* # [not win]
- jpeg 8* # [not win]
- zlib 1.* # [not win]
- cmake >=2.8.11
- libtiff 4.0.*
- libpng >=1.6.21,<1.7
- jpeg 8*
- zlib 1.*
- setuptools
run:
- python
- libtiff 4.0.* # [not win]
- libpng 1.6.* # [not win]
- jpeg 8* # [not win]
- zlib 1.* # [not win]
- libtiff 4.0.*
- libpng >=1.6.21,<1.7
- jpeg 8*
- zlib 1.*

test:
imports:
Expand All @@ -30,3 +36,8 @@ about:
home: http::/www.simpleitk.org
license: Apache 2.0
summary: Simplified interface to the Insight Toolkit for image registration and segmentation

extra:
recipe-maintainers:
- blowekamp
- zivy