Skip to content

Commit

Permalink
partial merge bitcoin#20359: Various config.site.in improvements and …
Browse files Browse the repository at this point in the history
…linting

- PYTHONPATH change breaks package detection for some reason
  • Loading branch information
kwvg committed Aug 24, 2021
1 parent 3f89162 commit b858cf7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 13 additions & 3 deletions depends/config.site.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
depends_prefix="`dirname ${ac_site_file}`/.."
# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
# ./configure but shellcheck doesn't know
# that, hence: disable=SC2034

true # Dummy command because shellcheck treats all directives before first
# command as file-wide, and we only want to disable for one line.
#
# See: https://github.com/koalaman/shellcheck/wiki/Directive

# shellcheck disable=SC2154
depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"

cross_compiling=maybe
host_alias=@HOST@
Expand Down Expand Up @@ -43,7 +53,7 @@ if test x@host_os@ = xdarwin; then
fi

PATH=$depends_prefix/native/bin:$PATH
PKG_CONFIG="`which pkg-config` --static"
PKG_CONFIG="$(which pkg-config) --static"

# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
Expand All @@ -61,7 +71,7 @@ fi
if test -n "@CXX@" -a -z "${CXX}"; then
CXX="@CXX@"
fi
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}"

if test -n "@AR@"; then
AR=@AR@
Expand Down
3 changes: 2 additions & 1 deletion test/lint/lint-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ if ! command -v shellcheck > /dev/null; then
fi

EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
if ! shellcheck "$EXCLUDE" $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
SOURCED_FILES=$(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') # Check shellcheck directive used for sourced files
if ! shellcheck "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
EXIT_CODE=1
fi

Expand Down

0 comments on commit b858cf7

Please sign in to comment.