From b3e8bbe4e5af934b3103b533de9349291e4caf4b Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 31 Aug 2022 12:11:30 -0700 Subject: [PATCH] CI: Clean circleci setup env file (#48315) --- .circleci/setup_env.sh | 62 +++++++----------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/.circleci/setup_env.sh b/.circleci/setup_env.sh index c03a7ff4be8b3..6d494f28d75d1 100755 --- a/.circleci/setup_env.sh +++ b/.circleci/setup_env.sh @@ -1,46 +1,15 @@ #!/bin/bash -e -# edit the locale file if needed -if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then - echo "Adding locale to the first line of pandas/__init__.py" - rm -f pandas/__init__.pyc - SEDC="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LC_ALL')\n" - sed -i "$SEDC" pandas/__init__.py - - echo "[head -4 pandas/__init__.py]" - head -4 pandas/__init__.py - echo -fi +echo "Install Miniconda" +CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Miniforge3-4.14.0-0-Linux-aarch64.sh" +echo "Downloading $CONDA_URL" +wget -q $CONDA_URL -O miniconda.sh +chmod +x miniconda.sh +MINICONDA_DIR="$HOME/miniconda3" +rm -rf $MINICONDA_DIR +./miniconda.sh -b -p $MINICONDA_DIR -MINICONDA_DIR=/usr/local/miniconda -if [ -e $MINICONDA_DIR ] && [ "$BITS32" != yes ]; then - echo "Found Miniconda installation at $MINICONDA_DIR" -else - echo "Install Miniconda" - DEFAULT_CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest" - if [[ "$(uname -m)" == 'aarch64' ]]; then - CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Miniforge3-4.10.1-4-Linux-aarch64.sh" - elif [[ "$(uname)" == 'Linux' ]]; then - if [[ "$BITS32" == "yes" ]]; then - CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86.sh" - else - CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86_64.sh" - fi - elif [[ "$(uname)" == 'Darwin' ]]; then - CONDA_URL="$DEFAULT_CONDA_URL-MacOSX-x86_64.sh" - else - echo "OS $(uname) not supported" - exit 1 - fi - echo "Downloading $CONDA_URL" - wget -q $CONDA_URL -O miniconda.sh - chmod +x miniconda.sh - - MINICONDA_DIR="$HOME/miniconda3" - rm -rf $MINICONDA_DIR - ./miniconda.sh -b -p $MINICONDA_DIR -fi export PATH=$MINICONDA_DIR/bin:$PATH echo @@ -70,11 +39,6 @@ time mamba env update -n pandas-dev --file="${ENV_FILE}" echo "conda list -n pandas-dev" conda list -n pandas-dev -if [[ "$BITS32" == "yes" ]]; then - # activate 32-bit compiler - export CONDA_BUILD=1 -fi - echo "activate pandas-dev" source activate pandas-dev @@ -90,15 +54,9 @@ if pip list | grep -q ^pandas; then pip uninstall -y pandas || true fi -if [ "$(conda list -f qt --json)" != [] ]; then - echo - echo "remove qt" - echo "causes problems with the clipboard, we use xsel for that" - conda remove qt -y --force || true -fi - echo "Build extensions" -python setup.py build_ext -q -j3 +# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs +python setup.py build_ext -q -j1 echo "Install pandas" python -m pip install --no-build-isolation --no-use-pep517 -e .