From 7b03b315481a9a95309ddfbd370b916e664b62ea Mon Sep 17 00:00:00 2001 From: ndilalla Date: Tue, 30 Jun 2020 11:29:44 -0700 Subject: [PATCH] Attempt to work on both py27 and py37. --- build_local.sh | 14 +++++++------ ci/build_and_test.sh | 11 +++++++++-- conda_recipe/xspec-modelsonly/meta.yaml | 26 +++++++++++++------------ 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/build_local.sh b/build_local.sh index 22d279b..9655376 100755 --- a/build_local.sh +++ b/build_local.sh @@ -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" @@ -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}" @@ -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) @@ -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..." diff --git a/ci/build_and_test.sh b/ci/build_and_test.sh index 37cf8fc..f61b30d 100755 --- a/ci/build_and_test.sh +++ b/ci/build_and_test.sh @@ -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) @@ -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 @@ -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 diff --git a/conda_recipe/xspec-modelsonly/meta.yaml b/conda_recipe/xspec-modelsonly/meta.yaml index c465325..8c411f1 100644 --- a/conda_recipe/xspec-modelsonly/meta.yaml +++ b/conda_recipe/xspec-modelsonly/meta.yaml @@ -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]