Skip to content

Commit

Permalink
[FIX] Use find's maxdepth to ensure correct library
Browse files Browse the repository at this point in the history
To avoid finding multiple directories that have 'python' in the name
under /usr/local/lib/ on the GitHub Actions runners, use the maxdepth
option for find to limit the search to directories of the pattern
'/usr/local/lib/python3.*'.
  • Loading branch information
matthewfeickert committed Apr 18, 2022
1 parent 81e57b5 commit 41a17b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jobs:
- name: Verify Python bindings
run: |
export LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
export PYTHON_VERSION_MINOR=$(_tmp=$(find /usr/local/lib/ -type d -iname "python*") && echo ${_tmp: -3}; unset _tmp)
export PYTHON_VERSION_MINOR=$(_tmp=$(find /usr/local/lib/ -maxdepth 1 -type d -iname "python3.*") && echo ${_tmp: -3}; unset _tmp)
export PYTHONPATH="/usr/local/lib/python${PYTHON_VERSION_MINOR}/site-packages:${PYTHONPATH}"
python3 -m pip list
python3 -m pip show xrootd
Expand Down

0 comments on commit 41a17b9

Please sign in to comment.