Skip to content

don't use 'python setup.py config' for numpy version >= 1.21 #394

don't use 'python setup.py config' for numpy version >= 1.21

don't use 'python setup.py config' for numpy version >= 1.21 #394

Workflow file for this run

name: easyblocks unit tests
on: [pull_request]
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
python: [3.6]
modules_tool: [Lmod-8.1.14]
module_syntax: [Lua]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: set up Python
uses: actions/setup-python@v1
with:
python-version: ${{matrix.python}}
architecture: x64
- name: install OS & Python packages
run: |
# disable apt-get update, we don't really need it,
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
# sudo apt-get update
# for modules tool
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
sudo ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so
fi
# for testing OpenMPI-system*eb we need to have Open MPI installed
sudo apt-get install libopenmpi-dev openmpi-bin
- name: install EasyBuild framework
run: |
# first determine which branch of easybuild-framework repo to install
BRANCH=2020b
if [ "x$GITHUB_BASE_REF" = 'xmaster' ]; then BRANCH=master; fi
if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi
echo "Using easybuild-framework branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)"
git clone -b $BRANCH --depth 10 --single-branch https://github.com/bear-rsg/easybuild-framework.git
cd easybuild-framework; git log -n 1; cd -
pip install $PWD/easybuild-framework
- name: install modules tool
run: |
cd $HOME
# use install_eb_dep.sh script provided with easybuild-framework
export INSTALL_DEP=$(which install_eb_dep.sh)
echo "Found install_eb_dep.sh script: $INSTALL_DEP"
# install modules tool
source $INSTALL_DEP ${{matrix.modules_tool}} $HOME
# changes in environment are not passed to other steps, so need to create files...
echo $MOD_INIT > mod_init
echo $PATH > path
if [ ! -z $MODULESHOME ]; then echo $MODULESHOME > moduleshome; fi
- name: install sources
run: |
# install from source distribution tarball, to test release as published on PyPI
python setup.py sdist
ls dist
export PREFIX=/tmp/$USER/$GITHUB_SHA
pip install --prefix $PREFIX dist/easybuild-easyblocks*tar.gz
- name: run test suite
env:
EB_VERBOSE: 1
EASYBUILD_MODULE_SYNTAX: ${{matrix.module_syntax}}
run: |
# initialize environment for modules tool
if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi
source $(cat $HOME/mod_init); type module
# make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
# also pick up changes to $PATH set by sourcing $MOD_INIT
export PREFIX=/tmp/$USER/$GITHUB_SHA
export PATH=$PREFIX/bin:$(cat $HOME/path)
export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
# tell EasyBuild which modules tool is available
if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then
export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl
elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then
export EASYBUILD_MODULES_TOOL=EnvironmentModulesC
elif [[ ${{matrix.modules_tool}} =~ ^modules-4 ]]; then
export EASYBUILD_MODULES_TOOL=EnvironmentModules
else
export EASYBUILD_MODULES_TOOL=Lmod
fi
eb --version
eb --show-config
# gather some useful info on test system
eb --show-system-info
# actively break "import setuptools" and "import pkg_resources",
# since EasyBuild should not have a runtime requirement on setuptools
echo 'raise ImportError("setuptools should no longer be relied on")' > $PREFIX/setuptools.py
echo 'raise ImportError("setuptools should no longer be relied on")' > $PREFIX/pkg_resources.py
export PYTHONPATH=$PREFIX:$PYTHONPATH
# run test suite
python -O -m test.easyblocks.suite
# check output of --list-easyblocks
eb --list-easyblocks > eb_list_easyblocks.out
grep 'ConfigureMake\>' eb_list_easyblocks.out
grep EB_GCC eb_list_easyblocks.out