Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

16 rader
505 B

#!/usr/bin/env bash
#
# `python-local-exec` is a drop-in replacement for the standard Python
# shebang line:
#
# #!/usr/bin/env python-local-exec
#
# Use it for scripts inside a project with an `.pyenv-version`
# file. When you run the scripts, they'll use the project-specified
# Python version, regardless of what directory they're run from. Useful
# for e.g. running project tasks in cron scripts without needing to
# `cd` into the project first.
set -e
export PYENV_DIR="${1%/*}"
exec python "$@"