summaryrefslogtreecommitdiffstats
path: root/recipe
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-12-06 17:37:35 +0000
committerGemma Fardell <47746591+gfardell@users.noreply.github.com>2019-12-06 17:37:35 +0000
commit3d3a0958fad475c6b0493ad85459e1c04ba4ba62 (patch)
tree53189dbb211ce7fbdaa6ee12e97d43e33e24d99c /recipe
parent1cb06ae408e413890f21e0776bed785a1111377b (diff)
downloadframework-3d3a0958fad475c6b0493ad85459e1c04ba4ba62.tar.gz
framework-3d3a0958fad475c6b0493ad85459e1c04ba4ba62.tar.bz2
framework-3d3a0958fad475c6b0493ad85459e1c04ba4ba62.tar.xz
framework-3d3a0958fad475c6b0493ad85459e1c04ba4ba62.zip
C lib (#458)
C library implemented with optimised axpy fucntions and gradient operator in c
Diffstat (limited to 'recipe')
-rw-r--r--recipe/bld.bat15
-rw-r--r--recipe/build.sh24
-rw-r--r--recipe/conda_build_config.yaml10
-rw-r--r--recipe/meta.yaml45
4 files changed, 94 insertions, 0 deletions
diff --git a/recipe/bld.bat b/recipe/bld.bat
new file mode 100644
index 0000000..af5ca40
--- /dev/null
+++ b/recipe/bld.bat
@@ -0,0 +1,15 @@
+
+IF NOT DEFINED CIL_VERSION (
+ECHO CIL_VERSION Not Defined.
+exit 1
+)
+
+ROBOCOPY /E "%RECIPE_DIR%\.." "%SRC_DIR%" /XD .git /XD Wrappers\Python\build
+
+mkdir "%SRC_DIR%\build_framework"
+
+cd "%SRC_DIR%\build_framework"
+cmake -G "NMake Makefiles" %RECIPE_DIR%\..\ -DCONDA_BUILD=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=%CONDA_PREFIX%\lib -DLIBRARY_INC=%CONDA_PREFIX% -DCMAKE_INSTALL_PREFIX=%PREFIX%
+
+nmake install
+if errorlevel 1 exit 1
diff --git a/recipe/build.sh b/recipe/build.sh
new file mode 100644
index 0000000..22cfae8
--- /dev/null
+++ b/recipe/build.sh
@@ -0,0 +1,24 @@
+if [ -z "$CIL_VERSION" ]; then
+ echo "Need to set CIL_VERSION"
+ exit 1
+fi
+# mkdir ${SRC_DIR}/ccpi
+mkdir -p ${SRC_DIR}/ccpi/Wrappers/Python
+cp -r "${RECIPE_DIR}/../Wrappers/Python/test" ${SRC_DIR}/ccpi/Wrappers/Python
+
+# cd ${SRC_DIR}/ccpi/Wrappers/Python
+# $PYTHON setup.py install
+
+
+mkdir ${SRC_DIR}/build_framework
+#cp -r "${RECIPE_DIR}/../" ${SRC_DIR}/build_framework
+
+cd ${SRC_DIR}/build_framework
+cmake ${RECIPE_DIR}/../ -DCONDA_BUILD=ON \
+ -DCMAKE_BUILD_TYPE="Release"\
+ -DLIBRARY_LIB=$CONDA_PREFIX/lib \
+ -DLIBRARY_INC=$CONDA_PREFIX \
+ -DCMAKE_INSTALL_PREFIX=$PREFIX
+
+make install
+# $PYTHON setup.py install
diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml
new file mode 100644
index 0000000..e5e168b
--- /dev/null
+++ b/recipe/conda_build_config.yaml
@@ -0,0 +1,10 @@
+python:
+ - 2.7 # [not win]
+ - 3.5
+ - 3.6
+numpy:
+ # TODO investigage, as it doesn't currently build with cvxp, requires >1.14
+ - 1.11
+ - 1.12
+ - 1.14
+ - 1.15
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
new file mode 100644
index 0000000..fee8e87
--- /dev/null
+++ b/recipe/meta.yaml
@@ -0,0 +1,45 @@
+package:
+ name: ccpi-framework
+ version: {{ environ['CIL_VERSION'] }}
+
+build:
+ preserve_egg_dir: False
+ script_env:
+ - CIL_VERSION
+ #number: 0
+
+test:
+ requires:
+ - python-wget
+ - cvxpy # [ unix and py36 and np115 ]
+
+ source_files:
+ - ./Wrappers/Python/test # [win]
+ - ./ccpi/Wrappers/Python/test # [not win]
+
+ commands:
+ - python -c "import os; print ('TESTING IN THIS DIRECTORY' , os.getcwd())"
+ - python -m unittest discover Wrappers/Python/test # [win]
+ - python -m unittest discover -s ccpi/Wrappers/Python/test # [not win]
+
+requirements:
+ build:
+ - {{ pin_compatible('numpy', max_pin='x.x') }}
+ - python
+ - setuptools
+ - cmake
+
+ run:
+ - {{ pin_compatible('numpy', max_pin='x.x') }}
+ - python
+ - numpy
+ - scipy
+ - matplotlib
+ - h5py
+ - pillow
+ - libgcc-ng # [not win]
+
+about:
+ home: http://www.ccpi.ac.uk
+ license: Apache 2.0 License
+ summary: 'CCPi Framework'