Skip to content
Snippets Groups Projects
Commit 11b4f3cd authored by Jayant Kolhe's avatar Jayant Kolhe
Browse files

Merge pull request #1891 from tbetbetbe/grpc-python-update-readme-install

Updates the INSTALL section for python
parents ab14dde1 aa0e44bd
No related branches found
No related tags found
No related merge requests found
gRPC Python gRPC Python
========= =========
The Python facility of gRPC. The Python facility of gRPC.
Status Status
------- -------
Alpha : Ready for early adopters Alpha : Ready for early adopters
Prerequisites PREREQUISITES
----------------------- -------------
- Python 2.7, virtualenv, pip
Python 2.7, virtualenv, pip, libprotobuf-dev, and libprotoc-dev. - [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core.
Building from source INSTALLATION
---------------------- -------------
On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
Run the following command to install gRPC Python.
```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -s python
```
This will download and run the [gRPC install script][], then install the latest version of the gRPC Python package. It also installs the Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin for python.
BUILDING FROM SOURCE
---------------------
- Clone this repository
- Build the gRPC core from the root of the - Build the gRPC core from the root of the
[gRPC git repo](https://github.com/grpc/grpc) [gRPC Git repository](https://github.com/grpc/grpc)
``` ```
$ make shared_c static_c $ make shared_c static_c
``` ```
...@@ -29,40 +34,16 @@ $ make shared_c static_c ...@@ -29,40 +34,16 @@ $ make shared_c static_c
$ tools/run_tests/build_python.sh $ tools/run_tests/build_python.sh
``` ```
TESTING
Testing -------
-----------------------
- Use run_python.sh to run gRPC as it was installed into the virtual environment - Use run_python.sh to run gRPC as it was installed into the virtual environment
``` ```
$ tools/run_tests/run_python.sh $ tools/run_tests/run_python.sh
``` ```
PACKAGING
Installing ---------
-----------------------
- Install the gRPC core
- [Debian package](https://github.com/grpc/grpc/releases)
```
$ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc_0.5.0_amd64.deb
$ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc-dev_0.5.0_amd64.deb
$ sudo dpkg -i libgrpc_0.5.0_amd64.deb libgrpc-dev_0.5.0_amd64.deb
```
- [From source](https://github.com/grpc/grpc/blob/master/INSTALL)
- Install gRPC Python's dependencies
```
$ pip install -r src/python/requirements.txt
```
- Install gRPC Python
```
$ pip install src/python/src
```
Packaging to PyPI
-----------------------
- Install packaging dependencies - Install packaging dependencies
``` ```
...@@ -73,3 +54,7 @@ $ pip install setuptools twine ...@@ -73,3 +54,7 @@ $ pip install setuptools twine
``` ```
$ ../../tools/distrib/python/submit.py $ ../../tools/distrib/python/submit.py
``` ```
[homebrew]:http://brew.sh
[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation
[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment