Commit graph

1143 commits

Author SHA1 Message Date
Yamashita, Yuu
8c503c6e75 Merge pull request #237 from blueyed/doc-recent-python-versions
doc: use recommended python versions
2014-11-05 09:13:55 -08:00
Yamashita, Yuu
743a637b59 Merge pull request #265 from yyuu/ruby-build-v20141028
Import changes from ruby-build v20141028
2014-11-04 21:15:26 -08:00
Yamashita, Yuu
7fe78245d8 Merge pull request #266 from konstantint/patch-1
Warn about #264 in the README
2014-11-04 09:28:20 -08:00
Konstantin Tretyakov
96c0362b53 Warn about #264 in the README 2014-11-04 18:54:19 +02:00
Yamashita Yuu
2dae281201 Need to chdir before running tests of python-build 2014-11-04 00:14:57 -08:00
Yamashita Yuu
4a52bfaff9 Fix broken tests 2014-11-04 00:04:25 -08:00
Yamashita Yuu
b26b83a11f Import changes from ruby-build v20141028 2014-10-29 04:04:10 -07:00
Yamashita, Yuu
35aed218cf Merge pull request #260 from jensraaby/anaconda210
Add Miniconda/Miniconda3 3.7.0 and Anaconda/Anaconda3 2.1.0
2014-10-24 08:16:37 +09:00
Jens Raaby
38ab616344 Add Miniconda/Miniconda3 3.7.0 and Anaconda/Anaconda3 2.1.0
SHA256 values generated with direct downloads from repo.continuum.io
2014-10-23 19:25:41 +01:00
Mislav Marohnić
7e0e85bdda Avoid JRuby warning during rehash Rubygems plugin
As it seems, JRuby 1.7 complains on stderr every time you invoke `system`:

    warning: executable? does not in this environment and will return a dummy value

It doesn't seem to complain when backtics are used. It's safe to use
backticks here because `rbenv rehash` doesn't output anything on stdout,
and the exit status of the command is irrelevant.
2014-10-19 18:06:09 +02:00
Mislav Marohnić
d1a0398fdb Merge pull request #638 from sstephenson/gem-rehash
Bring rbenv-gem-rehash functionality to core
2014-10-19 14:51:45 +02:00
Mislav Marohnić
67f429c41d Bring automatic gem-rehash functionality to rbenv core
This bakes in the functionality of rbenv-gem-rehash plugin.

The Rubygems hook is improved:

- It will not rehash for gems installed in locations that rbenv otherwise
  doesn't search for binstubs; for instance in case of
  `bundle --path vendor/bundle`.
- It rescues exceptions and makes them non-lethal by warning on stderr.
2014-10-19 14:35:43 +02:00
Mislav Marohnić
632263568e Add rbenv's own rbenv.d directory to hook paths
This allows rbenv source code to ship with built-in hooks.
2014-10-19 14:35:36 +02:00
Mislav Marohnić
bf39d88d11 Add tests for rbenv PATH and RBENV_HOOK_PATH handling 2014-10-19 14:35:36 +02:00
Yamashita Yuu
720870011b Merge branch 'altinstall' (fixes #255)
Allow installing CPython with `make altinstall` instead of
`make install` with following command-line.

```sh
$ env PYTHON_MAKE_INSTALL_PACKAGE="altinstall" pyenv install -v 3.4.2
```
2014-10-19 11:19:17 +09:00
Yamashita Yuu
b2ac5df98d Calling create_symlinks after ensurepip is unnecessary (#182, #255)
Install script of setuptools-6.1/pip-1.5.6 will create those links if needed
2014-10-19 10:59:35 +09:00
Yamashita Yuu
d9e772eb6e Stop creating symlinks w/ version suffix if altinstall has specified (#182, #255) 2014-10-19 00:34:20 +09:00
Yamashita Yuu
eef8ac2701 Use version suffixed executable (e.g. python3.4) for internal use of python (#255) 2014-10-19 00:28:33 +09:00
Yamashita Yuu
45b45bcf25 Pass --altinstall to ensurepip (#255) 2014-10-18 23:56:51 +09:00
Yamashita Yuu
ded98e11de Allow users to change the name of install target (#255) 2014-10-18 23:06:19 +09:00
Yamashita, Yuu
dc1b5a197f Merge pull request #254 from blueyed/add-Makefile
Add Makefile for 'make test'
2014-10-18 09:30:22 +09:00
Mislav Marohnić
07d675350f Merge pull request #636 from sstephenson/speedup-rehash
Speed up `rbenv rehash`
2014-10-16 12:29:51 +02:00
Daniel Hahler
79507fbadf Add Makefile for 'make test' 2014-10-16 03:13:39 +02:00
Daniel Hahler
de5c61cd59 Fix "version X is not installed" with multiple PYENV_VERSIONs
This was introduced when merging the rbenv upstream change
(https://github.com/sstephenson/rbenv/commit/6bb7f07d2d).
2014-10-16 02:51:07 +02:00
Mislav Marohnić
39cde6fc95 Merge pull request #528 from sstephenson/dylib
Speed up rbenv by dynamically loading compiled command
2014-10-15 18:19:54 +02:00
Mislav Marohnić
1381c2ca79 Simplify the shims registration implementation in rbenv-rehash
It doesn't need to be a bash array and we don't need a separate index of
shims registered. Simply keep everything in a space-separated string and
use that as an index as well.

This assumes that executable names *never* have spaces in them.
2014-10-15 05:46:18 +02:00
Mislav Marohnić
89d4e8a0e0 Speed up rehash process when there are many Ruby versions
On my system that has 25 versions under rbenv, this speeds up rehash
almost 3-fold:

- before: 391 ms
- after:  134 ms

This is achieved by removing duplicate names of executables before
registering them as shims. Since most Rubies will share a lot of the
same executable names ("ruby", "rake", "bundle", ...), this is a
considerable reduction in number of shims registered.
2014-10-15 05:46:18 +02:00
Mislav Marohnić
a8df5d587c Avoid changing directories during rehash process 2014-10-15 05:46:18 +02:00
Mislav Marohnić
e2173df4aa Revert "Don't duplicate shims in PATH"
Too many of our users have a shell initialization set up that
inadvertently duplicates some or most of the entries in their PATH,
bringing the system paths again in front of rbenv's shims. If this was a
nested shell (a typical scenario when starting up tmux), `rbenv init`
would get eval'd again but this time, shims won't get added to the front
of the PATH and would only stay and the end of the path, effectively
rendering them useless.

I tried to argue that this is a user problem rather than rbenv's, but I
can't fix everybody shell init when they report bugs. Instead, let's
revert to simpler times in rbenv where we just roll along with the
duplication and don't ask any questions.

This reverts commit 03fa148e81.

Fixes #369
2014-10-15 01:43:24 +02:00
Mislav Marohnić
e851250da6 Speed up obtaining exec/which/whence completions
Delegate to `rbenv-shims` instead of `rbenv shims` and therefore skip
going through the main `rbenv` executable again that would set up a lot
of the environment that was already set.
2014-10-15 01:24:45 +02:00
Yamashita Yuu
8e657374a1 Import recent changes from rbenv-versions 2014-10-15 00:46:11 +09:00
Yamashita, Yuu
77bd5bc6c9 Merge pull request #129 from blueyed/optimize-pyenv-which
Optimize pyenv-which: implement remove_from_path in Bash
2014-10-15 00:19:28 +09:00
Daniel Hahler
e82f943174 Merge rbenv's "Isolate rbenv-which tests …" (c69d9a11)
This is the remaining part of
c69d9a1128.

    commit c69d9a1128
    Author: Mislav Marohnić <mislav.marohnic@gmail.com>
    Date:   Mon Oct 13 12:39:47 2014 +0200

        Isolate rbenv-which tests from any `.ruby-version` file on the system

        Having a `.ruby-version` file in any of the parent directories of the
        local clone of rbenv could cause the test suite to fail because it
        wasn't expecting a local version to be set.
2014-10-13 21:20:57 +02:00
Daniel Hahler
bbf8cb4a95 Add test for PYENV_VERSION=3.4:2.7 2014-10-13 21:15:22 +02:00
Daniel Hahler
a1df551bcf Merge tests and remove_from_path from rbenv
This adds the missing parts from the upstream rbenv merge:
f4652fbbf0

- e4cbf04592
- 3ee395f9b5
2014-10-13 21:14:57 +02:00
Mislav Marohnić
c69d9a1128 Isolate rbenv-which tests from any .ruby-version file on the system
Having a `.ruby-version` file in any of the parent directories of the
local clone of rbenv could cause the test suite to fail because it
wasn't expecting a local version to be set.

Fixes #533
2014-10-13 12:39:47 +02:00
Mislav Marohnić
f4652fbbf0 Merge branch 'speedup-which'
Closes #560
2014-10-13 12:30:34 +02:00
Mislav Marohnić
3ee395f9b5 Clean up PATH sanitization in rbenv-which 2014-10-13 12:27:19 +02:00
Daniel Hahler
e4cbf04592 Improve performance of rbenv-which when RBENV_VERSION=system
This implements removing of the shims path element via bash
substitution, instead of jumping around in all the `$PATH` elements.
2014-10-13 12:26:43 +02:00
Mislav Marohnić
6bb7f07d2d Avoid rbenv-exec calling out to rbenv-version-name twice
Running any shim (and thus `rbenv-exec`) would always execute
`rbenv-version-name` twice: once in `rbenv-exec` and another time in
`rbenv-which`, even though RBENV_VERSION variable would have already
been populated at this point.

Now RBENV_VERSION is respected within `rbenv-which`.
2014-10-13 12:26:43 +02:00
Mislav Marohnić
51bd975820 Merge branch 'blank-versions'
Fixes #626
2014-10-13 11:51:46 +02:00
Mislav Marohnić
294cff3fd4 Fall back to cc as default compiler when gcc is not available 2014-10-13 04:12:35 +02:00
Mislav Marohnić
a6e0785b84 Create configure script to generate a cross-platform Makefile
The previous Makefile only worked on OS X. The dynamically generated
Makefile (from `Makefile.in`) should now work on multiple platforms
(tested on OS X and Ubuntu).
2014-10-13 04:12:35 +02:00
Mislav Marohnić
302b317b89 Fix shobj-conf on Darwin
The `shobj-conf` script imported from bash seems to not support the
latest OS X. This makes sure that `SHOBJ_LDFLAG=-dynamiclib` is output
for Darwin10+ (latest version is Darwin 13.0).
2014-10-13 04:12:35 +02:00
Mislav Marohnić
8facb3b3a7 Import shobj-conf script from bash
Given the `-o <HOST-OS>` parameter, the script generates environment
variables with information how to compile dynamically loadable libraries
for that system.

Imported from bash-3.2.48
2014-10-13 04:12:35 +02:00
Mislav Marohnić
b5622bee3a Try without -current_version
Seems to only work on OS X; fails on Travis
https://travis-ci.org/sstephenson/rbenv/jobs/16384866
2014-10-13 04:12:35 +02:00
Mislav Marohnić
3f74da0e73 Fail hard if RBENV_NATIVE_EXT is set but extensions failed to load 2014-10-13 04:12:35 +02:00
Mislav Marohnić
68b92a7f5d Test compiled native extensions on Travis CI 2014-10-13 04:12:35 +02:00
Mislav Marohnić
8bac958994 Stop using abs_dirname() in rbenv-init
It's slow and not necessary since we expect `$0` to already be expanded.

In tests this change forces us to deal with some relative paths, but
it's not a big deal. The `rbenv init -` output in the most common case
will be the same as before:

    source '/home/myuser/.rbenv/libexec/../completions/rbenv.bash'
2014-10-13 04:12:34 +02:00
Mislav Marohnić
5287e2ebf4 Avoid slow abs_dirname() by loading realpath extension
This speeds up every `rbenv` invocation significantly.
2014-10-13 04:12:34 +02:00