From 67a2bee68224e695e9b6c1da9f18ffefcce7307f Mon Sep 17 00:00:00 2001 From: Toni G <toni.giorgino@gmail.com> Date: Thu, 6 Dec 2018 11:51:30 +0100 Subject: [PATCH] nn --- .travis.yml | 2 +- conda/Makefile | 2 +- conda/build.sh | 14 -------------- conda/recipe/build.sh | 15 +++++++++++++++ conda/recipe/meta.yaml | 13 +++++-------- conda/run-conda-build.sh | 17 +++++++++++++++++ 6 files changed, 39 insertions(+), 24 deletions(-) delete mode 100644 conda/build.sh create mode 100644 conda/recipe/build.sh create mode 100644 conda/run-conda-build.sh diff --git a/.travis.yml b/.travis.yml index 83cd4d6e9..94d0c25c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,7 +87,7 @@ matrix: - os: linux dist: trusty sudo: required - env: PLUMED_CC=gcc PLUMED_CXX=g++ PLUMED_CONDA=yes + env: PLUMED_CONDA=yes # I don't put any mpi variant with macports since it takes too long to compile ## This command can be used to allow failures: allow_failures: diff --git a/conda/Makefile b/conda/Makefile index 2f9eb171d..021565a3f 100644 --- a/conda/Makefile +++ b/conda/Makefile @@ -6,7 +6,7 @@ default: all all: build build: - bash build.sh + bash run-conda-build.sh diff --git a/conda/build.sh b/conda/build.sh deleted file mode 100644 index 930077292..000000000 --- a/conda/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -bash miniconda.sh -b -p $HOME/miniconda -export PATH="$HOME/miniconda/bin:$PATH" -conda config --set always_yes yes --set changeps1 no -conda update -q conda -conda info -a -conda install conda-build - - - -# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html - diff --git a/conda/recipe/build.sh b/conda/recipe/build.sh new file mode 100644 index 000000000..47a1bf00c --- /dev/null +++ b/conda/recipe/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +env | sort + +# TG: The "disabled" features are workaround for possible conda+configure bugs in library +# search: building is ok but linking with the .so doesn't find them. + +./configure --prefix=$PREFIX --enable-shared --disable-python --disable-zlib --disable-external-lapack --disable-external-blas +make -j4 +make install + +cd python +make pip +export plumed_default_kernel=$PREFIX/lib +$PYTHON -m pip install diff --git a/conda/recipe/meta.yaml b/conda/recipe/meta.yaml index e57c26d40..e52244c93 100644 --- a/conda/recipe/meta.yaml +++ b/conda/recipe/meta.yaml @@ -6,13 +6,10 @@ package: version: {{ version }} source: - # Tar is preferred, but there a symlink therein crashes windows builds. Git is ok. + path: ../.. + # Tar is preferred, but a symlink therein crashes windows builds. Git is ok. # url: https://github.com/plumed/{{ name }}/archive/v{{ version }}.tar.gz # sha256: f4cf55c63a6798a0607f4e47eeeee7c1bc191668772c83ce4dabf3a5ba407426 - git_url: https://github.com/plumed/plumed2.git - git_rev: v{{ version }} - patches: - - 0001-use-python-kernel-in-prefix.patch build: number: 0 @@ -24,14 +21,14 @@ build: requirements: build: - #Â TONI the "not linux" nonsense is because the "compiler" macro resolves to the toolchain packages, - #Â which override $CC with the system default, which fails on circle-ci + # TONI the "not linux" nonsense is because the "compiler" macro resolves to the toolchain packages, + # which override $CC with the system default, which fails on circle-ci - {{ compiler('c') }} # [osx] - {{ compiler('cxx') }} # [osx] - {{ compiler('fortran') }} # [osx] - gcc_linux-64 # [linux] - gxx_linux-64 # [linux] - - gfortran_linux-64 #Â [linux] + - gfortran_linux-64 # [linux] - m2-bash # [win] - m2-curl # [win] - m2-findutils # [win] diff --git a/conda/run-conda-build.sh b/conda/run-conda-build.sh new file mode 100644 index 000000000..5a8d662f0 --- /dev/null +++ b/conda/run-conda-build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Anywhere but outside of the repository +CONDA_HOME=/var/tmp/miniconda + +wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh +bash /tmp/miniconda.sh -b -f -p $CONDA_HOME +export PATH="$CONDA_HOME/bin:$PATH" +conda config --set always_yes yes --set changeps1 no +conda update -q conda +conda info -a +conda install conda-build + + + +# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html + -- GitLab