From 66a31d46004bee090933a4977b89b3684d21ef75 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Tue, 28 Apr 2015 16:14:31 -0500 Subject: [PATCH 1/5] moving conda files to this repo --- .travis-install.sh | 8 +++----- conda/build.sh | 38 ++++++++++++++++++++++++++++++++++++++ conda/meta.yaml | 29 +++++++++++++++++++++++++++++ conda/post-link.sh | 17 +++++++++++++++++ conda/pre-link.sh | 6 ++++++ 5 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 conda/build.sh create mode 100644 conda/meta.yaml create mode 100644 conda/post-link.sh create mode 100644 conda/pre-link.sh diff --git a/.travis-install.sh b/.travis-install.sh index 0ec08d2ea3..c59a20f171 100755 --- a/.travis-install.sh +++ b/.travis-install.sh @@ -7,13 +7,11 @@ set -e # exit as soon as an error occurs msg=`git log --pretty=oneline -1` echo "Building commit: $msg" -# setup conda recipe -wget https://github.com/cyclus/ciclus/archive/master.zip -O ciclus.zip -unzip -j ciclus.zip "*/cycamore/*" -d conda-recipe -sed -i "s/- cyclus/- cyclus 0.0/g" conda-recipe/meta.yaml +# setup conda recipe to use develop cyclus +sed -i "s/- cyclus/- cyclus 0.0/g" conda/meta.yaml # build -conda build --no-test conda-recipe +conda build --no-test conda # install conda install --use-local cycamore=0.0 diff --git a/conda/build.sh b/conda/build.sh new file mode 100644 index 0000000000..86da896a41 --- /dev/null +++ b/conda/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +mkdir build +cd build +export LD_LIBRARY_PATH=$PREFIX/lib/ +export CMAKE_LIBRARY_PATH=$PREFIX/lib/ +export PATH=$PREFIX/bin:$PATH +export MACOSX_DEPLOYMENT_TARGET= + +$PREFIX/bin/cyclus --version + +if [[ `uname` == 'Linux' ]]; then + cmake .. \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCYCLUS_ROOT_DIR=$PREFIX \ + -DHDF5_ROOT=$PREFIX \ + -DBOOST_ROOT=$PREFIX \ + -DBOOST_LIBRARYDIR=$PREFIX/lib \ + -DBoost_NO_SYSTEM_PATHS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DLAPACK_LIBRARIES=$PREFIX/lib/liblapack.so \ + -DBLAS_LIBRARIES=$PREFIX/lib/libblas.so +else + export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib/cyclus:$PREFIX/lib + cmake .. \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCYCLUS_ROOT_DIR=$PREFIX \ + -DHDF5_ROOT=$PREFIX \ + -DCOIN_ROOT_DIR=$PREFIX \ + -DBOOST_ROOT=$PREFIX \ + -DLAPACK_LIBRARIES=$PREFIX/lib/liblapack.dylib \ + -DBLAS_LIBRARIES=$PREFIX/lib/libblas.dylib +fi + +make +make install + +echo DONE diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 0000000000..95f525c964 --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,29 @@ +package: + name: cycamore + version: 0.0 + +# Only use fn and url for polyphemus compatability +source: + fn: cycamore-src.tar.gz # ["TRAVIS" not in environ] + url: https://github.com/cyclus/cycamore/archive/develop.tar.gz # ["TRAVIS" not in environ] + path: .. # ["TRAVIS" in environ] + +requirements: + build: + - cyclus + - cmake + - python + run: + - cyclus + +test: + requires: + - nose + - pytables + +build: + string: nightly + +about: + home: Cyclus + license: BSD 3 Clause diff --git a/conda/post-link.sh b/conda/post-link.sh new file mode 100644 index 0000000000..d8ee67f829 --- /dev/null +++ b/conda/post-link.sh @@ -0,0 +1,17 @@ + +echo "post-link.sh, PREFIX: $PREFIX" + +mv $PREFIX/bin/cycamore_unit_tests $PREFIX/bin/cycamore_unit_tests_base +echo " +#!/bin/bash +export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib/cyclus + export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib/cyclus +export CYCLUS_NUC_DATA=$PREFIX/share/cyclus/cyclus_nuc_data.h5 +export CYCLUS_PATH=$PREFIX/lib/cyclus +export CYCLUS_RNG_SCHEMA=$PREFIX/share/cyclus/cyclus.rng.in +export DYLD_LIBRARY_PATH= +$PREFIX/bin/cycamore_unit_tests_base \$* + +" > $PREFIX/bin/cycamore_unit_tests +chmod 755 $PREFIX/bin/cycamore_unit_tests + diff --git a/conda/pre-link.sh b/conda/pre-link.sh new file mode 100644 index 0000000000..9a188008e3 --- /dev/null +++ b/conda/pre-link.sh @@ -0,0 +1,6 @@ + +echo "pre-link.sh, PREFIX: $PREFIX" + +export LD_LIBRARY_PATH=$PREFIX/lib/:$LD_LIBRARY_PATH +export CMAKE_LIBRARY_PATH=$PREFIX/lib/:$CMAKE_LIBRARY_PATH + From 291b625f279b12e0aa9230ee550e7ab4d2cce054 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Tue, 28 Apr 2015 16:18:35 -0500 Subject: [PATCH 2/5] conda->conda-recipe --- .travis-install.sh | 4 ++-- {conda => conda-recipe}/build.sh | 0 {conda => conda-recipe}/meta.yaml | 0 {conda => conda-recipe}/post-link.sh | 0 {conda => conda-recipe}/pre-link.sh | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename {conda => conda-recipe}/build.sh (100%) rename {conda => conda-recipe}/meta.yaml (100%) rename {conda => conda-recipe}/post-link.sh (100%) rename {conda => conda-recipe}/pre-link.sh (100%) diff --git a/.travis-install.sh b/.travis-install.sh index c59a20f171..cc8aff563f 100755 --- a/.travis-install.sh +++ b/.travis-install.sh @@ -8,10 +8,10 @@ msg=`git log --pretty=oneline -1` echo "Building commit: $msg" # setup conda recipe to use develop cyclus -sed -i "s/- cyclus/- cyclus 0.0/g" conda/meta.yaml +sed -i "s/- cyclus/- cyclus 0.0/g" conda-recipe/meta.yaml # build -conda build --no-test conda +conda build --no-test conda-recipe # install conda install --use-local cycamore=0.0 diff --git a/conda/build.sh b/conda-recipe/build.sh similarity index 100% rename from conda/build.sh rename to conda-recipe/build.sh diff --git a/conda/meta.yaml b/conda-recipe/meta.yaml similarity index 100% rename from conda/meta.yaml rename to conda-recipe/meta.yaml diff --git a/conda/post-link.sh b/conda-recipe/post-link.sh similarity index 100% rename from conda/post-link.sh rename to conda-recipe/post-link.sh diff --git a/conda/pre-link.sh b/conda-recipe/pre-link.sh similarity index 100% rename from conda/pre-link.sh rename to conda-recipe/pre-link.sh From ef5e019dc869b674b54b8e8a59cfb827f1f1c388 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Tue, 28 Apr 2015 17:12:14 -0500 Subject: [PATCH 3/5] we don't build nightlies --- conda-recipe/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 95f525c964..cc2e038463 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -21,9 +21,6 @@ test: - nose - pytables -build: - string: nightly - about: home: Cyclus license: BSD 3 Clause From 6697fb482f893e4f15ad40bc8d14ac110fc52da0 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Wed, 29 Apr 2015 09:08:13 -0500 Subject: [PATCH 4/5] we *do* build nightlies --- conda-recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index cc2e038463..95f525c964 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -21,6 +21,9 @@ test: - nose - pytables +build: + string: nightly + about: home: Cyclus license: BSD 3 Clause From d4dd024a0f6c0edb2bce8d55571c17b1e4593630 Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Fri, 1 May 2015 10:10:19 -0500 Subject: [PATCH 5/5] kill extra space --- conda-recipe/post-link.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/post-link.sh b/conda-recipe/post-link.sh index d8ee67f829..ed30d81a2b 100644 --- a/conda-recipe/post-link.sh +++ b/conda-recipe/post-link.sh @@ -5,7 +5,7 @@ mv $PREFIX/bin/cycamore_unit_tests $PREFIX/bin/cycamore_unit_tests_base echo " #!/bin/bash export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib/cyclus - export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib/cyclus +export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib/cyclus export CYCLUS_NUC_DATA=$PREFIX/share/cyclus/cyclus_nuc_data.h5 export CYCLUS_PATH=$PREFIX/lib/cyclus export CYCLUS_RNG_SCHEMA=$PREFIX/share/cyclus/cyclus.rng.in