From fb11502ed50a3ff67baf0fafd00ef1d3cd2e62dc Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 1 Jun 2016 16:05:34 -0700 Subject: [PATCH] fix python scripts path --- dotfiles/lib/shellenv.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/shellenv.sh b/dotfiles/lib/shellenv.sh index 453a1451..7ba51566 100644 --- a/dotfiles/lib/shellenv.sh +++ b/dotfiles/lib/shellenv.sh @@ -13,6 +13,10 @@ function add_to_path { eval "$result" } +function get_python_scripts_path { + python -c "import sysconfig; print sysconfig.get_path('scripts')" +} + function _setup_env { _path_helper add_to_path /usr/local/lib/python2.7/site-packages --after @@ -21,7 +25,7 @@ function _setup_env { hash brew 2>/dev/null && add_to_path --before "$(brew --prefix coreutils)/libexec/gnubin" add_to_path "/usr/local/bin" - add_to_path "$(python -c 'import sysconfig; print sysconfig.get_path(\"scripts\")')" --before + add_to_path "$(get_python_scripts_path)" --before if is_osx; then export CFLAGS=-Qunused-arguments