From df80bb228839bfa47b10ab2792a9e305b7bdae9d Mon Sep 17 00:00:00 2001 From: omodei Date: Thu, 24 Oct 2019 12:05:57 -0700 Subject: [PATCH] Testing local builds --- build_local.sh | 4 ++-- conda_recipe/xspec-modelsonly/build.sh | 11 ++++++++--- conda_recipe/xspec-modelsonly/meta.yaml | 18 +++++++++--------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build_local.sh b/build_local.sh index aaf55e9..8d963a0 100755 --- a/build_local.sh +++ b/build_local.sh @@ -44,7 +44,7 @@ echo "Python version: ${TRAVIS_PYTHON_VERSION}" set -e # Environment -# libgfortranver="3.0" +libgfortranver="3.0" UPDATE_CONDA=true @@ -82,7 +82,7 @@ conda config --set anaconda_upload no # Create test environment echo "Create test environment..." -conda create --yes --name $ENVNAME -c conda-forge python=$TRAVIS_PYTHON_VERSION +conda create --yes --name $ENVNAME -c conda-forge python=$TRAVIS_PYTHON_VERSION libgfortran=${libgfortranver} # Make sure conda-forge is the first channel conda config --add channels conda-forge diff --git a/conda_recipe/xspec-modelsonly/build.sh b/conda_recipe/xspec-modelsonly/build.sh index f8bb693..a4a7fea 100644 --- a/conda_recipe/xspec-modelsonly/build.sh +++ b/conda_recipe/xspec-modelsonly/build.sh @@ -3,9 +3,12 @@ cd BUILD_DIR # We need a custom include and library path to use the packages installed # in the build environment +echo SRC_DIR="${SRC_DIR}" +echo BUILD_PREFIX=$"{BUILD_PREFIX}" + export CFLAGS="-I$CONDA_PREFIX/include" export CXXFLAGS="-std=c++11 -Wno-c++11-narrowing -I$CONDA_PREFIX/include" -export LDFLAGS="$LDFLAGS -L$CONDA_PREFIX/lib" +export LDFLAGS="$LDFLAGS -L$CONDA_PREFIX/lib -L${PREFIX}/lib" #export CFLAGS="${CFLAGS} -I${PREFIX}/include -O2 -Wall --pedantic -Wno-comment -Wno-long-long -g -ffloat-store -fPIC" #export CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include -O2 -std=c++11 -Wno-c++11-narrowing -Wall --pedantic -Wno-comment -Wno-long-long -g -ffloat-store -fPIC" @@ -24,8 +27,10 @@ if [ "$(uname)" == "Darwin" ]; then # Build for a fairly old mac to ensure portability ./configure --prefix=${SRC_DIR}/xspec-modelsonly-build - make HD_ADD_SHLIB_LIBS=yes - make install + ./hmake 'LDFLAGS_CXX=-lcfitsio -lCCfits -lccfits -lwcs -lgfortran' 'XSLM_USER_FLAGS="-I${PREFIX}/include"' 'XSLM_USER_LIBS="-L${PREFIX}/lib -lCCfits -lcfitsio -lwcslib -lgfortran"' + + #make HD_ADD_SHLIB_LIBS=yes + #make install #./hmake 'LDFLAGS_CXX=-headerpad_max_install_names -lcfitsio -lCCfits -lccfits -lwcs -lgfortran' 'XSLM_USER_LIBS="-L${PREFIX}/lib -lCCfits -lcfitsio -lwcslib -lgfortran"' fi diff --git a/conda_recipe/xspec-modelsonly/meta.yaml b/conda_recipe/xspec-modelsonly/meta.yaml index 2dd1913..5641b5a 100644 --- a/conda_recipe/xspec-modelsonly/meta.yaml +++ b/conda_recipe/xspec-modelsonly/meta.yaml @@ -12,20 +12,20 @@ build: requirements: build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - {{ compiler('fortran') }} - - ncurses==5.* + #- {{ compiler('c') }} + #- {{ compiler('cxx') }} + #- {{ compiler('fortran') }} + - ncurses>=5 - readline==6.2 - cfitsio - ccfits - wcslib - - libgfortran - #- clang_osx-64 # [osx] - #- clangxx_osx-64 # [osx] - #- gfortran_osx-64 # [osx] + #- libgfortran==3.0 + - clang_osx-64 # [osx] + - clangxx_osx-64 # [osx] + - gfortran_osx-64 # [osx] host: - - ncurses==5.* + - ncurses>=5 - readline==6.2 # Note that ncurses is only needed to build but I am not