Skip to content

Commit

Permalink
Changing the build number between py2 and py3.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndilalla committed Nov 18, 2019
1 parent 8789b99 commit 1ab2d88
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
42 changes: 21 additions & 21 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
# FROM TRAVIS:
TRAVIS_OS_NAME="unknown"
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_BUILD_NUMBER=1
TRAVIS_EVENT_TYPE="push"
#TRAVIS_BRANCH="master"
Expand Down Expand Up @@ -59,9 +59,9 @@ if $UPDATE_CONDA ; then
conda update --yes -q conda conda-build
fi

if [[ ${TRAVIS_OS_NAME} == osx ]];
if [[ ${TRAVIS_PYTHON_VERSION} == 2.7 ]];
then
conda config --add channels $conda_channel
READLINE="readline=${READLINE_VERSION}"
fi

# Answer yes to all questions (non-interactive)
Expand All @@ -73,7 +73,7 @@ conda config --set anaconda_upload no
# Create test environment
echo " ======================> Creating the test environment..."

conda create --yes --name $ENVNAME -c $conda_channel python=$TRAVIS_PYTHON_VERSION readline=${READLINE_VERSION}
conda create --yes --name $ENVNAME -c $conda_channel python=$TRAVIS_PYTHON_VERSION ${READLINE}
#libgfortran=${LIBGFORTRAN_VERSION}

# Make sure conda-forge is the first channel
Expand All @@ -85,8 +85,8 @@ conda config --add channels $conda_channel
echo "=====================> Activate test environment..."

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

echo "======> getting the file..."
if ! [ -f xspec-modelsonly-v6.22.1.tar.gz ]; then
Expand All @@ -111,19 +111,19 @@ conda install --use-local -c $conda_channel xspec-modelsonly

# UPLOAD TO CONDA:
# If we are on the master branch upload to the channel
if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]]; then
echo "This is a pull request, not uploading to Conda channel"
else
if [[ "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "This is a push to TRAVIS_BRANCH=${TRAVIS_BRANCH}"
if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
conda install -c conda-forge anaconda-client
echo "Uploading ${CONDA_BUILD_PATH}"
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
anaconda -t $CONDA_UPLOAD_TOKEN upload -u omodei $HOME/miniconda/conda-bld/linux-64/*.tar.bz2 --force
else
anaconda -t $CONDA_UPLOAD_TOKEN upload -u omodei $HOME/miniconda/conda-bld/*/*.tar.bz2 --force
fi
fi
fi
fi
# if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]]; then
# echo "This is a pull request, not uploading to Conda channel"
# else
# if [[ "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
# echo "This is a push to TRAVIS_BRANCH=${TRAVIS_BRANCH}"
# if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
# conda install -c conda-forge anaconda-client
# echo "Uploading ${CONDA_BUILD_PATH}"
# if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# anaconda -t $CONDA_UPLOAD_TOKEN upload -u omodei $HOME/miniconda/conda-bld/linux-64/*.tar.bz2 --force
# else
# anaconda -t $CONDA_UPLOAD_TOKEN upload -u omodei $HOME/miniconda/conda-bld/*/*.tar.bz2 --force
# fi
# fi
# fi
# fi
3 changes: 0 additions & 3 deletions ci/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ fi
echo "======> installing..."
conda install --use-local -c $conda_channel xspec-modelsonly

# TEMP
conda search xspec-modelsonly --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
3 changes: 2 additions & 1 deletion conda_recipe/xspec-modelsonly/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ source:
#fn: xspec-modelsonly-v6.22.1.tar.gz

build:
number: 1
number: 1 # [py2k]
number: 2 # [py3k]

requirements:
build:
Expand Down

0 comments on commit 1ab2d88

Please sign in to comment.