[New-bugs-announce] [issue30842] pyenv activate for bash and tcsh
Arnon Sela
report at bugs.python.org
Mon Jul 3 15:36:47 EDT 2017
New submission from Arnon Sela:
Remove hard coded path in activate family of virtualenv scripts.
Currently, VIRTUAL_ENV is set hard coded. Event after --relocatable
Instead, change to have is defined dynamically:
E.g. bash:
called=$_
[[ $called != $0 ]] && fullpath="${BASH_SOURCE[@]}" || fullpath=$0
fullpath=$(readlink -f $fullpath)
VIRTUAL_ENV=$(dirname $(dirname $fullpath))
E.g. tcsh:
set sourced=($_)
if ("$sourced" != "") then
set fullpath="$sourced[2]"
endif
if ("$0" != "tcsh") then
set fullpath="$0"
endif
set fullpath=`readlink -f $fullpath`
set binpath=`dirname $fullpath`
setenv VIRTUAL_ENV `dirname $binpath`
----------
messages: 297611
nosy: PyAcrisel
priority: normal
severity: normal
status: open
title: pyenv activate for bash and tcsh
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30842>
_______________________________________
More information about the New-bugs-announce
mailing list