Skip to content

Commit

Permalink
Updating CONTRIB/README to drop linuxbrew referencs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Nov 25, 2015
1 parent 20fb8e5 commit d7a6c06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 46 deletions.
17 changes: 6 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,18 @@ $ # [sudo] ldconfig

## Testing

Unfortunately, `tox` will fail by default due to the absence of
`grpcio` from `setup.py`. In order to successfully set up a `tox`
test environment (e.g `ENV=py27`), run
`tox` should work without modification, assuming you've installed
on Linux via

```bash
tox -e ${ENV}
$ apt-get install libgrpc-dev
```

and watch the install fail (missing dependencies), then with the partially
set up environment, execute:
or on Mac OS X via

```bash
BREW_PREFIX=$(brew --prefix)
VERSION=0.10.0a0
CFLAGS=-I${BREW_PREFIX}/include LDFLAGS=-L${BREW_PREFIX}/lib \
.tox/${ENV}/bin/pip install grpcio==${VERSION}
unset BREW_PREFIX
$ brew tap grpc/grpc
$ brew install grpc
```

## False Starts
Expand Down
46 changes: 11 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,31 @@ to support via HTTP/1.1.

## Installing gRPC

**NOTE**: These are out-of-date (as of November 18, 2015).

Make sure you have downloaded [`homebrew`][6] on OS X or
[`linuxbrew`][7] on Linux. (On Linux, also be sure to
add `brew` to `${PATH}` as instructed.)

First, install the gRPC core (C/C++) library
Before you can install the Python library (`grpcio`) you'll need the
gRPC core library on your system. To install this on Debian Linux:

```bash
curl -fsSL https://goo.gl/getgrpc | bash
$ apt-get install libgrpc-dev
```

Since this uses `brew` to install, this cannot be run as
root (via `sudo`).

Next, install the [Python][11] `grpcio` [library][12] via:
or on Mac OS X:

```bash
BREW_PREFIX=$(brew --prefix)
[sudo] CFLAGS=-I${BREW_PREFIX}/include LDFLAGS=-L${BREW_PREFIX}/lib \
pip install --upgrade grpcio
$ brew tap grpc/grpc
$ brew install grpc
```

You may wish to run this as root (via `sudo`) so it can be included with
your machine's Python libraries. If not, you'll need to use a Python
[virtual environment][13] so that non-privileged (i.e. non-`sudo`) installs
are allowed.

Finally, you can install this library via
Once you've installed the system library, install the Python
library via:

```bash
[sudo] pip install -e git+https://github.com/dhermes/gcloud-python-bigtable#egg=gcloud-bigtable
$ pip install --upgrade grpcio
```

Again, you may wish to install as root or in a virtual environment.

## Running `gcloud_bigtable` code

Since the gRPC core is installed via `brew`, the system libraries
are not in a place that Python can readily find them.

In order to run code that uses `gcloud_bigtable` with these
libraries, you'll need to set the `LD_LIBRARY_PATH` environment
variable:
Finally, you can install this library via

```bash
BREW_PREFIX=$(brew --prefix)
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BREW_PREFIX}/lib
pip install -e git+https://github.com/dhermes/gcloud-python-bigtable#egg=gcloud-bigtable
```

## Authorization
Expand Down Expand Up @@ -167,5 +144,4 @@ See [`CONTRIBUTING.md`][3] for instructions on development.
[10]: https://github.com/grpc/grpc/issues/2611
[11]: https://github.com/grpc/grpc/tree/master/src/python
[12]: https://pypi.python.org/pypi/grpcio
[13]: http://docs.python-guide.org/en/latest/dev/virtualenvs/
[14]: https://console.developers.google.com/

0 comments on commit d7a6c06

Please sign in to comment.