aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Gems,-Eggs-and-Perl-Modules.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Gems,-Eggs-and-Perl-Modules.md')
-rw-r--r--docs/Gems,-Eggs-and-Perl-Modules.md34
1 files changed, 16 insertions, 18 deletions
diff --git a/docs/Gems,-Eggs-and-Perl-Modules.md b/docs/Gems,-Eggs-and-Perl-Modules.md
index 07d810c77..19dbb4fb8 100644
--- a/docs/Gems,-Eggs-and-Perl-Modules.md
+++ b/docs/Gems,-Eggs-and-Perl-Modules.md
@@ -21,19 +21,19 @@ Habit maybe?
One reason is executables go in `/usr/local/bin`. Usually this isn’t a
writable location. But if you installed Homebrew as we recommend,
`/usr/local` will be writable without sudo. So now you are good to
-install the development tools you need without risking a sudo.
+install the development tools you need without risking the use of sudo.
-### Python packages (eggs) without sudo
Rather than changing the rights on /Library/Python, we recommend the
+## Python packages (eggs) without sudo
following options:
-### With a brewed Python - you don’t need sudo
+### With a brewed Python
Note, `easy_install` is deprecated. We install `pip` (or `pip3` for
python3) along with python/python3.
We set up distutils such that `pip install` will always put modules in
`$(brew --prefix)/lib/pythonX.Y/site-packages` and scripts in
-`$(brew --prefix)/share/python`. Therefore, you won’t need `sudo`!
+`$(brew --prefix)/share/python`. Therefore, you won’t need sudo!
Do `brew info python` or `brew info python3` for precise information
about the paths. Note, a brewed Python still searches for modules in
@@ -50,7 +50,7 @@ That dir might not yet exist, but you can create it:
`mkdir -p ~/Library/Python/2.7/lib/python/site-packages`
To teach `easy_install` and `pip` to install there, either use the
-`—user` switch or create a `~/.pydistutils.cfg` file with the
+`--user` switch or create a `~/.pydistutils.cfg` file with the
following content:
[install]
@@ -60,10 +60,9 @@ following content:
[Virtualenv](http://www.virtualenv.org/en/latest/) ships `pip` and
creates isolated Python environments with separate site-packages,
-therefore you won’t need `sudo`.
+therefore you won’t need sudo.
-Rubygems without sudo
----------------------
+## Rubygems without sudo
**If you use rbenv or RVM then you should ignore this stuff**
@@ -74,19 +73,19 @@ without sudo. You should add this to your path. See the caveats in the
### With system’s Ruby
To make Ruby install to `/usr/local`, we need to add
-`gem: -n/usr/local/bin` to your `~/.gemrc`. It’s YAML…so do it manually
+`gem: -n/usr/local/bin` to your `~/.gemrc`. It’s YAML, so do it manually
or use this:
echo "gem: -n/usr/local/bin" >> ~/.gemrc
-**However all versions of RubyGems before 1.3.6 are buggy** and ignore
+**However, all versions of RubyGems before 1.3.6 are buggy** and ignore
the above setting. Sadly a fresh install of Snow Leopard comes with
1.3.5. Currently the only known way to get around this is to upgrade
rubygems as root:
`sudo gem update --system`
-### An Alternative
+### An alternative
Just install everything into the Homebrew prefix like this:
@@ -94,16 +93,15 @@ Just install everything into the Homebrew prefix like this:
### It doesn’t work! I get some “permissions” error when I try to install stuff!
-*Note, maybe you shouldn’t do this on Lion, since Apple have decided it
+*Note, maybe you shouldn’t do this on Lion, since Apple has decided it
is not a good default.*
If you ever did a `sudo gem`, etc. before then a lot of files will have
-been created chown root. Fix with:
+been created owned by root. Fix with:
`sudo chown -R $USER /Library/Ruby /Library/Perl /Library/Python`
-Perl CPAN Modules without sudo
-------------------------------
+## Perl CPAN modules without sudo
The Perl module local::lib works similarly to rbenv/RVM (although for
modules only, not perl installations). A simple solution that only
@@ -112,7 +110,7 @@ pollutes your /Library/Perl a little is to install
`sudo cpan local::lib`
-Note that will install some other dependencies like `Module::Install`.
+Note that this will install some other dependencies like `Module::Install`.
Then put the appropriate incantation in your shell’s startup, e.g. for
`.bash_profile` you insert the below, for others see the
[local::lib](https://metacpan.org/pod/local::lib) docs.
@@ -126,11 +124,11 @@ subdirectories will be in your `PATH` and `PERL5LIB` etc.
### Avoiding sudo altogether for Perl
If you don’t even want (or can’t) use sudo for bootstrapping
-`local::lib` just manually install `local::lib` in
~/perl5 and add the relevant path to `PERL5LIB` before the .bashrc eval incantation.
+`local::lib`, just manually install `local::lib` in
-Another alternative is to use `perlbrew` to install a separate copy of Perl in your home directory, or wherever you like :
```bash
+Another alternative is to use `perlbrew` to install a separate copy of Perl in your home directory, or wherever you like:
curl -L https://install.perlbrew.pl | bash
perlbrew install perl-5.16.2
echo ".~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc