Ville Skyttä
a9e11ba164
Use `command` and `type` instead of `which` ( #2144 )
`which` has been deprecated in Debian's debianutils 5.0+
They suggest using `type` and `command` as replacements:
3a8dd10b45 ,
610a65c6ef
4 vuotta sitten
Ivan Pozdeev
c6c4e41eb9
Bats: show output on failed assertions
4 vuotta sitten
Ivan Pozdeev
f504b01818
consistent message
4 vuotta sitten
Ivan Pozdeev
876be1bb04
Bats: path_without: support multiple args
4 vuotta sitten
Ivan Pozdeev
6185bb55e6
allow for sys.executable to be different
4 vuotta sitten
Ivan Pozdeev
eb89256f59
Remove the sample code from pyenv init
since there proved to be to many cases to fit
4 vuotta sitten
Ivan Pozdeev
cabdc45181
fix possible side effect
4 vuotta sitten
Ivan Pozdeev
acc949c27b
fix test
4 vuotta sitten
native-api
4f689cdf83
Allow system Python in sbin ( #2065 )
Arch Linux has Python is sbin as well as bin
4 vuotta sitten
Ivan Pozdeev
26134d9b38
Allow system Python in sbin
Arch Linux has Python is sbin as well as bin
4 vuotta sitten
native-api
f7754ae6a4
Remove PATH warning ( #2001 )
* In some cases (Ubuntu), `pyenv init -` has to be run before `pyenv init --path`.
* The warning has served its purpose by now.
5 vuotta sitten
native-api
1706436fae
Use system Python3 for tests ( #1979 )
PEP 394 now doesn't require `python` presence or specify what it is.
Tests that invoke it use Py3-specific code.
5 vuotta sitten
Ivan Pozdeev
3e3f40fefc
Warn users to add `pyenv init --path` to ~/.profile
To facilitate migration
5 vuotta sitten
Ivan Pozdeev
7838707595
Separate startup logic into PATH and the rest
PATH manipulation should be done in ~/.profile rather than ~/.*rc since .rc can be sourced multiple times
5 vuotta sitten
Ivan Pozdeev
b0b862ca64
Don't print actual PATH in test output
5 vuotta sitten
Ville Skyttä
641916270b
feat: support (skip) commented lines in version-file
Sometimes it is convenient to be able to temporarily disable something
in a version-file. Because these files often aren't necessarily tracked
in a SCM, especially when working with virtualenvs, the SCM diffs won't
help with showing removed lines which are currently the only way to
disable something.
5 vuotta sitten
Ville Skyttä
b5008ce74e
test(init): remove misleading detect from parent shell case arg
The generated script does not take/use any arguments, so passing
/bin/zsh to it serves only to cause confusion.
5 vuotta sitten
Ville Skyttä
f06fb60b1f
Make work in nounset (-u) mode
5 vuotta sitten
Ivan Pozdeev
e44490c639
Revert "add tests for `PYENV_FILE_ARG`"
This reverts commit 438e828eb5 .
# Conflicts:
# test/pyenv_ext.bats
5 vuotta sitten
cornfeedhobo
cadebd8e65
Search for plugins in PYENV_DIR and PYENV_ROOT ( #1697 )
5 vuotta sitten
M. Smits
71d2e4549e
Updated documentation pyenv init for fish shell comform to readme. ( #1703 )
5 vuotta sitten
Claudio Jolowicz
be595ededa
Fix duplicate test in prefix.bats due to bad merge ( #1603 )
The test "prefix for system in /" is duplicated in test/prefix.bats.
Both tests are completely identical. This commit removes the
duplication.
It appears that the culprit is this merge from rbenv/master, from 2016:
cf1beda362
With the current development version of bats, this leads to the
following error when running `make test`:
Error:
Duplicate test name(s) in file
"/home/travis/build/pyenv/pyenv/test/prefix.bats":
test_prefix_for_system_in_-2f
Note that the development version is what pyenv's Makefile uses. With
the latest release of bats, the duplication only leads to a warning:
bats warning:
duplicate test name(s) in /src/test/prefix.bats:
test_prefix_for_system_in_-2f
6 vuotta sitten
Brian Dowling
a8ca63fcc0
Update help docs to clarify multiple version(s) are allowed ( #1197 )
* Update help docs to clarify multiple version(s) are allowed
* Tweek version(s) help description
6 vuotta sitten
Daniel Hahler
ecd67c8223
pyenv-exec: no `-a` with `exec` to keep $PATH with system version ( #1169 )
Using `exec -a` caused Python to use $PATH to look up the full program name (for
`sys.executable`), which 314937d then tried to fix by changing $PATH
also for the system version.
This is not necessary anymore when not using the short name with `exec`.
This was rejected upstream
(https://github.com/rbenv/rbenv/pull/1089#issuecomment-394531896 ), since
it is not a problem with Ruby apparently.
Uses $PYENV_ROOT to check if system version is used.
Fixes https://github.com/pyenv/pyenv/issues/98 .
Fixes https://github.com/pyenv/pyenv/issues/789 .
6 vuotta sitten
Daniel Hahler
31b7e1c390
tests: remove "supports python -S <cmd>" ( #1168 )
This was imported semi-automatically in 0965577, but `ruby -S` is
different from `python -S`.
`ruby -S`: look for the script using PATH environment variable
`python -S`: don't imply 'import site' on initialization
6 vuotta sitten
Maxime Brunet
2b174ab69f
List versions starting with a dot
7 vuotta sitten
Andrew Rabert
0f596d2504
Revert "Merge pull request #1153 from cmcginty/remove-sbang"
This reverts commit 070e1c859fb2584c3dbe0a6fbe58cbc80938654e, reversing
changes made to 3faeda67bb .
7 vuotta sitten
Casey McGinty
83e5459cfb
Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.
Related to pyenv/pyenv-virtualenv#259
8 vuotta sitten
Daniel Hahler
4f21d9a2ea
Fix abs_dirname for relative symlinks in same directory
Ref (abs_dirname in bats): https://github.com/sstephenson/bats/pull/224
Ref: https://github.com/rbenv/rbenv/pull/868
Fixes https://github.com/pyenv/pyenv/issues/580
7 vuotta sitten
Yamashita, Yuu
b3ba0fd7e3
Refactor test code of python-build. Use curl during tests by default
8 vuotta sitten
Yamashita, Yuu
fc90785f75
Allow overriding HTTP client type based on environment variable `PYTHON_BUILD_HTTP_CLIENT` ( #1126 )
8 vuotta sitten
Yamashita, Yuu
1ec57a0c68
Add basic test for rehash wait
8 vuotta sitten
Yamashita, Yuu
7973e59473
Fix rehash test to give up sooner after lock file's presence
8 vuotta sitten
Yamashita, Yuu
83429344ea
Rewrite some tests for pyenv which was recently imported from rbenv
8 vuotta sitten
Victor Lim
9daf81f16e
Fix https://github.com/rbenv/rbenv/issues/1065
Command `rbenv version-name > .ruby-version` will create an empty `.ruby-version` file
before running `rbenv-version-file`. This causes `rbenv-version-file` to return empty
string which in turn causes `rbenv-version-name` to return `system`.
Ensure size of `.ruby-version` is non-zero as a workaround.
8 vuotta sitten
Marco Hinz
643023d98f
Add tests for shell integration
8 vuotta sitten
Daniel Hahler
a9ca72ab8e
test/which.bats: do not export PATH
Otherwise `sed` might not be found later in bats/libexec/bats-exec-test,
in case `/usr/bin` gets removed.
9 vuotta sitten
Jeff Kowalski
a81da8d864
Revert quoting change in previous commit; adjust test to match code
Revert back to original quoting style used before previous commit.
Adjust init.bats to reflect changes for successful tests.
9 vuotta sitten
Yamashita, Yuu
bec978d0f6
Workaround for CI failures with versions with multiple digits
https://travis-ci.org/pyenv/pyenv/jobs/215777826
9 vuotta sitten
Yamashita, Yuu
d01fa09a7d
Migrate project URL to https://github.com/pyenv/pyenv
9 vuotta sitten
Jason Karns
8eb97549e1
Conforms OLD_RBENV_VERSION to RBENV_* convention
Keeping rbenv-controlled variables to RBENV_* "namespace" helps with
discoverability (and tools like rbenv-env) but also consistency and a
very minor degree of safety/isolation from env impact.
9 vuotta sitten
Mislav Marohnić
c4d97ad392
Finalize `rbenv shell -` implementation
This ensures that OLD_RBENV_VERSION is never exported. This makes the
implementation a little bit more complex, since more logic needs to be
pushed down into eval'd code.
9 vuotta sitten
Ville Skyttä
725ff0c5dd
Spelling fixes
9 vuotta sitten
Yamashita, Yuu
7fadd939ad
v1.0.0 ( fixes #520 )
10 vuotta sitten
Yamashita, Yuu
a02f5dde4f
s/rbenv/pyenv/g
10 vuotta sitten
Yamashita, Yuu
93ece2ac16
Rewrite with using here document syntax
10 vuotta sitten
Yamashita, Yuu
36138f4901
Rewrite with using here document syntax
10 vuotta sitten
Yamashita, Yuu
1b35cfaa2c
1) Remove useless `touch` 2) Add explicit shebang line to executable for testing
10 vuotta sitten
Yamashita, Yuu
83e874a165
Add explicit shebang to executable for testing
10 vuotta sitten
Yamashita, Yuu
8eefa41a4d
Remove useless `touch` line
10 vuotta sitten