Skip to content

Commit

Permalink
Testing local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
omodei committed Oct 24, 2019
1 parent c0e8af4 commit df80bb2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "Python version: ${TRAVIS_PYTHON_VERSION}"
set -e

# Environment
# libgfortranver="3.0"
libgfortranver="3.0"

UPDATE_CONDA=true

Expand Down Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions conda_recipe/xspec-modelsonly/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions conda_recipe/xspec-modelsonly/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df80bb2

Please sign in to comment.