Skip to content

Commit

Permalink
Attempt to work on both py27 and py37.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndilalla committed Jun 30, 2020
1 parent f426110 commit 7b03b31
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
14 changes: 8 additions & 6 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
# FROM TRAVIS:
TRAVIS_OS_NAME="unknown"
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_BUILD_NUMBER=1
TRAVIS_EVENT_TYPE="push"
#TRAVIS_BRANCH="master"
TRAVIS_BRANCH="no_master"
Expand Down Expand Up @@ -48,7 +47,6 @@ UPDATE_CONDA=false

ENVNAME=xsmodelsonly_test_$TRAVIS_PYTHON_VERSION

conda_channel=conda-forge

echo "Running on ${TRAVIS_OS_NAME}"
echo "Python version: ${TRAVIS_PYTHON_VERSION}"
Expand All @@ -62,6 +60,9 @@ fi
if [[ ${TRAVIS_PYTHON_VERSION} == 2.7 ]];
then
READLINE="readline=${READLINE_VERSION}"
conda_channel=conda-forge/label/cf201901
else
conda_channel=conda-forge
fi

# Answer yes to all questions (non-interactive)
Expand All @@ -84,14 +85,15 @@ conda config --add channels $conda_channel
# Activate test environment
echo "=====================> Activate test environment..."

#source $CONDA_PREFIX/etc/profile.d/conda.sh
source /home/ndilalla/work/fermi/miniconda3/etc/profile.d/conda.sh
source $CONDA_PREFIX/etc/profile.d/conda.sh
#source /home/ndilalla/work/fermi/miniconda3/etc/profile.d/conda.sh
conda activate $ENVNAME

echo "======> getting the file..."
#if ! [ -f xspec-modelsonly-v6.22.1.tar.gz ]; then
if ! [ -f heasoft-6.25src.tar.gz ]; then
# curl -LO -z xspec-modelsonly-v6.22.1.tar.gz https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft6.22.1/xspec-modelsonly-v6.22.1.tar.gz
#fi
curl -LO -z heasoft-6.25src.tar.gz https://www.dropbox.com/s/zw6giglocr1z3o0/heasoft-6.25src.tar.gz
fi

# Build package
echo "Build package..."
Expand Down
11 changes: 9 additions & 2 deletions ci/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ fi
if [[ ${TRAVIS_PYTHON_VERSION} == 2.7 ]];
then
READLINE="readline=${READLINE_VERSION}"
conda_channel=conda-forge/label/cf201901
else
conda_channel=conda-forge
fi

# Answer yes to all questions (non-interactive)
Expand All @@ -49,9 +52,10 @@ echo "=====================> Activate test environment..."
source activate $ENVNAME

echo "======> getting the file..."
if ! [ -f xspec-modelsonly-v6.22.1.tar.gz ]; then
if ! [ -f heasoft-6.25src.tar.gz ]; then
#curl -LO -z xspec-modelsonly-v6.22.1.tar.gz https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft6.22.1/xspec-modelsonly-v6.22.1.tar.gz
curl -LO -z xspec-modelsonly-v6.22.1.tar.gz https://www.dropbox.com/s/tthemkgy27lx71c/xspec-modelsonly-v6.22.1.tar.gz
#curl -LO -z xspec-modelsonly-v6.22.1.tar.gz https://www.dropbox.com/s/tthemkgy27lx71c/xspec-modelsonly-v6.22.1.tar.gz
curl -LO -z heasoft-6.25src.tar.gz https://www.dropbox.com/s/zw6giglocr1z3o0/heasoft-6.25src.tar.gz
fi

# Build package
Expand All @@ -70,6 +74,9 @@ fi
echo "======> installing..."
conda install --use-local -c $conda_channel xspec-modelsonly

echo "======> dependency list..."
conda search xspec-modelsonly=6.25 --use-local --info

# UPLOAD TO CONDA:
# If we are on the master branch upload to the channel
if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]]; then
Expand Down
26 changes: 14 additions & 12 deletions conda_recipe/xspec-modelsonly/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,34 @@ build:

requirements:
build:
#- ccfits==2.5
#- cfitsio==3.470
#- gfortran_osx-64 # [osx]
#- ccfits==2.5 # [py2k]
- cfitsio==3.410 # [py2k]
- gfortran_osx-64 # [osx]
- {{ compiler('c') }} # [linux]
- {{ compiler('cxx') }} # [linux]
- {{ compiler('fortran') }} # [linux]
#- libgfortran>=3.0,<4.0
#- ncurses==5.9 # [py2k]
- libgfortran>=3.0,<4.0 # [py2k]
- ncurses==5.9 # [py2k]
- ncurses # [py3k]
- readline==6.2 # [py2k]
- readline # [py3k]
- toolchain==2.1.2 # [py2k]
#- wcslib==5.20
- wcslib==5.18 # [py2k]
- curl
- perl

host:
- ncurses
- readline
- ncurses==5.9 # [py2k]
- ncurses # [py3k]
- readline==6.2 # [py2k]
- readline # [py3k]
#- cfitsio==3.470

run:
#- ccfits==2.5
#- cfitsio==3.470
#- wcslib==5.20
#- libgfortran
- ccfits==2.5 # [py2k]
- cfitsio==3.410 # [py2k]
- wcslib==5.18 # [py2k]
- libgfortran # [py2k]
- ncurses==5.9 # [py2k]
- ncurses # [py3k]
- readline==6.2 # [py2k]
Expand Down

0 comments on commit 7b03b31

Please sign in to comment.