diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-10-11 16:28:08 +0200 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-10-11 16:28:08 +0200 |
commit | ab995df777ca8bd0340f66be5624fa543517c13d (patch) | |
tree | 660335e5d00ae68ab61b3cd21faef3e9135aacb1 /share | |
parent | 7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25 (diff) | |
parent | 4d939802ae208a79ef685fe59b204bcc86df4b6b (diff) | |
download | spack-ab995df777ca8bd0340f66be5624fa543517c13d.tar.gz spack-ab995df777ca8bd0340f66be5624fa543517c13d.tar.bz2 spack-ab995df777ca8bd0340f66be5624fa543517c13d.tar.xz spack-ab995df777ca8bd0340f66be5624fa543517c13d.zip |
Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase
Conflicts:
lib/spack/spack/build_environment.py
lib/spack/spack/cmd/install.py
lib/spack/spack/cmd/setup.py
lib/spack/spack/package.py
var/spack/repos/builtin/packages/gmp/package.py
var/spack/repos/builtin/packages/hdf5/package.py
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/csh/convert-pyext.sh | 5 | ||||
-rwxr-xr-x | share/spack/qa/check_dependencies | 26 | ||||
-rwxr-xr-x | share/spack/qa/run-flake8-tests | 8 |
3 files changed, 30 insertions, 9 deletions
diff --git a/share/spack/csh/convert-pyext.sh b/share/spack/csh/convert-pyext.sh deleted file mode 100644 index a48bcdbcca..0000000000 --- a/share/spack/csh/convert-pyext.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash --noprofile -PYEXT_REGEX=".*/.*/package.py" - -find var/spack/repos/builtin/packages/ -type f -regextype sed -regex ${PYEXT_REGEX} -exec \ - sed -i 's/python('\''setup.py'\'', /setup_py(/' {} \; diff --git a/share/spack/qa/check_dependencies b/share/spack/qa/check_dependencies index cf3d204f48..e999463b03 100755 --- a/share/spack/qa/check_dependencies +++ b/share/spack/qa/check_dependencies @@ -65,6 +65,32 @@ for dep in "$@"; do exit 1 fi + + # Flake8 and Sphinx require setuptools in order to run. + # Otherwise, they print out this error message: + # + # Traceback (most recent call last): + # File: "/usr/bin/flake8", line 5, in <module> + # from pkg_resources import load_entry_point + # ImportError: No module named pkg_resources + # + # Print a more useful error message if setuptools not found. + if [[ $dep == flake8 || $dep == sphinx* ]]; then + # Find which Python is being run + # Spack-installed packages have a hard-coded shebang + python_cmd=$(head -n 1 $(which $dep) | cut -c 3-) + # May not have a shebang + if [[ $python_cmd != *python* ]]; then + python_cmd=python + fi + # Check if setuptools is in the PYTHONPATH + if ! $python_cmd -c "import setuptools" 2> /dev/null; then + echo "ERROR: setuptools is required to run $dep." + echo "Please add it to your PYTHONPATH." + + exit 1 + fi + fi done echo "Dependencies found." diff --git a/share/spack/qa/run-flake8-tests b/share/spack/qa/run-flake8-tests index 350ef3161f..6fe97160e3 100755 --- a/share/spack/qa/run-flake8-tests +++ b/share/spack/qa/run-flake8-tests @@ -23,10 +23,6 @@ deps=( # Check for dependencies "$QA_DIR/check_dependencies" "${deps[@]}" || exit 1 -# Move to root directory of Spack -# Allows script to be run from anywhere -cd "$SPACK_ROOT" - # Gather array of changed files changed=($("$QA_DIR/changed_files" "*.py")) @@ -36,6 +32,10 @@ if [[ ! "${changed[@]}" ]]; then exit 0 fi +# Move to root directory of Spack +# Allows script to be run from anywhere +cd "$SPACK_ROOT" + function cleanup { # Restore original package files after modifying them. for file in "${changed[@]}"; do |