Skip to content

Commit

Permalink
Drop Python 2 support
Browse files Browse the repository at this point in the history
IMP has dropped Python 2 suppport, so we must too.
  • Loading branch information
benmwebb committed Jun 9, 2024
1 parent c049ad3 commit 0816190
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["2.7", "3.12"]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup conda
Expand All @@ -31,8 +31,7 @@ jobs:
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gcc_linux-64.sh
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gxx_linux-64.sh
mkdir build && cd build
if test "${{ matrix.python-version }}" = "2.7" ; then PY2=on; else PY2=off; fi
cmake .. -DIMP_DIR=${CONDA_PREFIX}/lib/cmake/IMP -DUSE_PYTHON2=${PY2} -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
cmake .. -DIMP_DIR=${CONDA_PREFIX}/lib/cmake/IMP -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
make
./setup_environment.sh pytest --cov=.. --cov-branch --cov-report=xml -v test/*/*.py
${GCC/gcc/gcov} $(find . -name "*.gcno")
Expand Down
12 changes: 1 addition & 11 deletions tools/setup_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,8 @@ fi

python_version=$1

if [ ${python_version} = "2.7" ]; then
BOOST=""
pip="pip<=19.3.1"
# Python.h includes crypt.h, which is no longer provided by default
crypt="libxcrypt"
else
BOOST="libboost-devel"
pip="pip"
crypt=""
fi
conda config --remove channels defaults # get conda-forge, not main, packages
conda create --yes -q -n python${python_version} -c salilab -c conda-forge python=${python_version} ${pip} ${crypt} imp-nightly ${BOOST} gxx_linux-64 eigen cereal swig cmake numpy
conda create --yes -q -n python${python_version} -c salilab -c conda-forge python=${python_version} pip imp-nightly libboost-devel gxx_linux-64 eigen cereal swig cmake numpy
eval "$(conda shell.bash hook)"
conda activate python${python_version}
pip install pytest-cov coverage

0 comments on commit 0816190

Please sign in to comment.