Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
6003aa1e
Commit
6003aa1e
authored
Apr 10, 2015
by
Joshua Haberman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #278 from haberman/python-travis
Added Python to Travis build and clarified setup instructions.
parents
f0b510ac
2f56bf98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
.travis.yml
.travis.yml
+3
-0
README.md
python/README.md
+16
-10
No files found.
.travis.yml
View file @
6003aa1e
...
...
@@ -11,6 +11,9 @@ script:
-
./autogen.sh && ./configure && make -j2
-
cd java && mvn test && cd ..
-
cd javanano && mvn test && cd ..
-
cd python && python setup.py build && python setup.py google_test && cd ..
-
export LD_LIBRARY_PATH=../src/.libs
-
cd python && python setup.py build --cpp_implementation && python setup.py google_test --cpp_implementation && cd ..
-
make distcheck -j2
notifications
:
email
:
false
python/README.md
View file @
6003aa1e
...
...
@@ -52,8 +52,18 @@ Installation
$ python setup.py build
$ python setup.py google_test
If you want to build/test c++ implementation,
run:
To build the C++ implementation
run:
$ python setup.py build --cpp_implementation
To test and use the C++ implementation, you must make libprotobuf.so
from the C++ build accessible. You can either install the C++ code
you built, or set LD_LIBRARY_PATH:
$ (cd .. && make install)
or
$ export LD_LIBRARY_PATH=../src/.libs
Then run the tests like so:
$ python setup.py google_test --cpp_implementation
If some tests fail, this library may not work correctly on your
...
...
@@ -73,12 +83,13 @@ Installation
or:
$ (cd .. && make install)
$ python setup.py install --cpp_implementation
This step may require superuser privileges.
NOTE: To use C++ implementation, you need to
install C++ protobuf runtime
library of the same version and export the environment variable before this
s
tep. See the "C++ Implementation" s
ection below for more details.
NOTE: To use C++ implementation, you need to
export an environment
variable before running your program. See the "C++ Implementation"
section below for more details.
Usage
=====
...
...
@@ -100,12 +111,7 @@ To use the C++ implementation, you need to:
2) Export an environment variable:
$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
You need to export this variable before running setup.py script to build and
install the extension. You must also set the variable at runtime, otherwise
You must set this variable at runtime, before running your program, otherwise
the pure-Python implementation will be used. In a future release, we will
change the default so that C++ implementation is used whenever it is available.
It is strongly recommended to run
`python setup.py test`
after setting the
variable to "cpp", so the tests will be against C++ implemented Python
messages.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment