blob: 0bca457a33ebf8a9d4cc69a1d5a969bfb67711e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
gRPC Python
=========
The Python facility of gRPC.
Status
-------
Alpha : Ready for early adopters
PREREQUISITES
-------------
- Python 2.7, virtualenv, pip
- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core.
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
[gRPC Git repository](https://github.com/grpc/grpc)
```
$ make shared_c static_c
```
- Use build_python.sh to build the Python code and install it into a virtual environment
```
$ tools/run_tests/build_python.sh
```
TESTING
-------
- Use run_python.sh to run gRPC as it was installed into the virtual environment
```
$ tools/run_tests/run_python.sh
```
PACKAGING
---------
- Install packaging dependencies
```
$ pip install setuptools twine
```
- Push to PyPI
```
$ ../../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
|