Merge pull request #61 from charlieok/minor_updates

Minor updates
This commit is contained in:
Charlie O'Keefe 2019-03-30 10:37:03 -06:00 committed by GitHub
commit 0abc644d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 33 deletions

View File

@ -146,11 +146,9 @@ $
## Clone this git project on your machine
From a location where you want to place your local clone of this repository (e.g. `~/Projects`)
```
$ git clone git@github.com:zcash/zcash-gitian.git
```
From a location where you want to place your local clone of this repository (e.g. `~/Projects`). If
there's a possibility you'll want to make and contribute changes, consider forking the repository
and cloning from your fork.
cd into the project repo
@ -272,24 +270,34 @@ a command like `type python3` should tell you where it is installed on your syst
zcash-gitian$ type python3
python3 is /usr/local/bin/python3
zcash-gitian$ /usr/local/python3 --version
Python 3.7.2
Python 3.7.3
```
You may also want to check if the `python3` in `PATH` is a symlink to a versioned location, if you
are using a system (like `brew`) that can manage multiple installed versions. This way, our virtual
environment will remain pinned to a specific python version even after a newer python version is
installed later.
```
$ ls -n /usr/local/bin/python3
lrwxr-xr-x 1 501 20 34 Mar 30 09:35 /usr/local/bin/python3 -> ../Cellar/python/3.7.3/bin/python3
```
We can use python's built-in `venv` module to create a virtual environment:
```
zcash-gitian$ /usr/local/bin/python3 -m venv local/python_v3.7.2_venv
zcash-gitian$ /usr/local/Cellar/python/3.7.3/bin/python3 -m venv local/python_v3.7.3_venv
```
Translation: "Create a virtual environment at ./local/python_v3.7.2_venv".
Translation: "Create a virtual environment at ./local/python_v3.7.3_venv".
The project subdirectory `local` is `.gitignored` to provide a convenient location for files we
don't want to commit and track in version control.
You should now have a tree of directories and files in `local/python_v3.7.2_venv`:
You should now have a tree of directories and files in `local/python_v3.7.3_venv`:
```
zcash-gitian$ ls -F local/python_v3.7.2_venv/
zcash-gitian$ ls -F local/python_v3.7.3_venv/
bin/ include/ lib/ pyvenv.cfg
```
@ -297,7 +305,7 @@ Inside the `bin` directory, among other things, are the entries `python` and `py
symlinks that point back to the `python3` executable we used to create this environment:
```
zcash-gitian$ ls -F local/python_v3.7.2_venv/bin/
zcash-gitian$ ls -F local/python_v3.7.3_venv/bin/
activate activate.fish easy_install-3.7* pip3* python@
activate.csh easy_install* pip* pip3.7* python3@
```
@ -311,7 +319,7 @@ An `activate` script is provided, and you can use that, but if you're using `dir
a simple automatic activation for the project directory by adding the following line to `.envrc`:
```
load_prefix local/python_v3.7.2_venv
load_prefix local/python_v3.7.3_venv
```
The command `load_prefix` is provided by `direnv` to modify a whole set of common "path" variables
@ -320,7 +328,7 @@ The command `load_prefix` is provided by `direnv` to modify a whole set of commo
Let's add that line now:
```
zcash-gitian$ echo "load_prefix local/python_v3.7.2_venv" >> .envrc
zcash-gitian$ echo "load_prefix local/python_v3.7.3_venv" >> .envrc
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
zcash-gitian$ direnv allow
direnv: loading .envrc
@ -335,11 +343,11 @@ locations we default to:
```
zcash-gitian$ echo $PATH
/Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.2_venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
/Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.3_venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
zcash-gitian$ type python
python is /Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.2_venv/bin/python
python is /Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.3_venv/bin/python
zcash-gitian$ type python3
python3 is /Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.2_venv/bin/python3
python3 is /Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.3_venv/bin/python3
```
Since the `python` and `python3` commands will now run from the locations we've installed into our
@ -353,8 +361,6 @@ environment active when using a shell at (or below) that location.
`pip` has a command to upgrade itself. Let's go ahead and run that:
```
zcash-gitian$ pip --version
pip 18.1 from /Users/harrypotter/Projects/zcash-gitian/local/python_v3.7.2_venv/lib/python3.7/site-packages/pip (python 3.7)
zcash-gitian$ pip install --upgrade pip
Collecting pip
[...]

View File

@ -2,13 +2,13 @@
This document assumes you are starting from a fresh install of macOS.
Most recently tested 2019-03-22 with the following macOS release:
Most recently tested 2019-03-30 with the following macOS release:
```
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.3
BuildVersion: 18D109
ProductVersion: 10.14.4
BuildVersion: 18E226
```
@ -18,11 +18,11 @@ BuildVersion: 18D109
macOS includes git, so you should already have that. It may prompt you to set up developer tools if
you're using it for the first time.
Most recently tested 2019-03-22 with the following git release:
Most recently tested 2019-03-30 with the following git release:
```
$ git --version
git version 2.17.2 (Apple Git-113)
git version 2.20.1 (Apple Git-117)
```
@ -50,9 +50,9 @@ Most recently tested 2019-03-22 with the following Homebrew release:
```
$ brew --version
Homebrew 2.0.5
Homebrew/homebrew-core (git revision b26ddf; last commit 2019-03-21)
Homebrew/homebrew-cask (git revision 8a0f5; last commit 2019-03-21)
Homebrew 2.0.6
Homebrew/homebrew-core (git revision 6abd1; last commit 2019-03-30)
Homebrew/homebrew-cask (git revision 7c038; last commit 2019-03-30)
```
That last line about "homebrew-cask" refers to a component that started as a separate plugin and now
@ -73,7 +73,7 @@ that, the second attempt should succeed.
$ brew cask install virtualbox
```
Most recently tested 2019-03-22 with the following Virtualbox release:
Most recently tested 2019-03-30 with the following Virtualbox release:
```
$ virtualbox --help
@ -103,11 +103,11 @@ Vagrant 2.2.4
$ brew install gnupg
```
Most recently tested 2019-03-22 with the following GnuPG release:
Most recently tested 2019-03-30 with the following GnuPG release:
```
$ gpg --version
gpg (GnuPG) 2.2.14
gpg (GnuPG) 2.2.15
libgcrypt 1.8.4
[...]
```
@ -134,11 +134,11 @@ $ type python3
python3 is /usr/local/bin/python3
```
Most recently tested 2019-03-22 with the following Python release:
Most recently tested 2019-03-30 with the following Python release:
```
$ python3 --version
Python 3.7.2
Python 3.7.3
```
@ -165,13 +165,13 @@ present:
```
$ echo $PROMPT_COMMAND
_direnv_hook;
_direnv_hook;[...]
```
direnv also supports several other shells -- zsh, fish, tcsh, and elvish as of this writing. Its
website includes instructions for enabling each of the shells it supports.
Most recently tested 2019-03-22 with the following direnv release:
Most recently tested 2019-03-30 with the following direnv release:
```
$ direnv --version