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
17ca0fee
Commit
17ca0fee
authored
May 15, 2015
by
Joshua Haberman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #351 from tamird/remove-manifest-fix-dist
[PYTHON] Only generate protos in development
parents
a526605a
e4f4d9fe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
setup.py
python/setup.py
+7
-10
travis-test.sh
ruby/travis-test.sh
+1
-1
travis.sh
travis.sh
+7
-2
No files found.
python/setup.py
View file @
17ca0fee
#! /usr/bin/env python
#
# See README for usage instructions.
import
sys
import
glob
import
os
import
subprocess
import
sys
# We must use setuptools, not distutils, because we need to use the
# namespace_packages option for the "google" package.
...
...
@@ -86,6 +87,10 @@ def generate_proto(source):
def
GenerateUnittestProtos
():
# Unittest protos are only needed for development.
if
not
os
.
path
.
exists
(
"../.git"
):
return
generate_proto
(
"../src/google/protobuf/unittest.proto"
)
generate_proto
(
"../src/google/protobuf/unittest_custom_options.proto"
)
generate_proto
(
"../src/google/protobuf/unittest_import.proto"
)
...
...
@@ -153,15 +158,7 @@ if __name__ == '__main__':
ext_module_list
.
append
(
Extension
(
"google.protobuf.pyext._message"
,
[
"google/protobuf/pyext/descriptor.cc"
,
"google/protobuf/pyext/descriptor_containers.cc"
,
"google/protobuf/pyext/descriptor_pool.cc"
,
"google/protobuf/pyext/extension_dict.cc"
,
"google/protobuf/pyext/message.cc"
,
"google/protobuf/pyext/repeated_composite_container.cc"
,
"google/protobuf/pyext/repeated_scalar_container.cc"
,
],
glob
.
glob
(
'google/protobuf/pyext/*.cc'
),
define_macros
=
[(
'GOOGLE_PROTOBUF_HAS_ONEOF'
,
'1'
)],
include_dirs
=
[
"."
,
"../src"
],
libraries
=
[
'protobuf'
],
...
...
ruby/travis-test.sh
View file @
17ca0fee
#!/
bin/
bash
#!/
usr/bin/env
bash
# Exit on any error.
set
-e
...
...
travis.sh
View file @
17ca0fee
#!/
bin/
bash
#!/
usr/bin/env
bash
build_cpp
()
{
./autogen.sh
...
...
@@ -95,6 +95,8 @@ build_python() {
cd
python
python setup.py build
python setup.py
test
python setup.py sdist
sudo
pip
install
virtualenv
&&
virtualenv /tmp/protoenv
&&
/tmp/protoenv/bin/pip
install
dist/
*
cd
..
}
...
...
@@ -102,10 +104,13 @@ build_python_cpp() {
./autogen.sh
./configure
make
-j2
export
LD_LIBRARY_PATH
=
../src/.libs
export
LD_LIBRARY_PATH
=
../src/.libs
# for Linux
export
DYLD_LIBRARY_PATH
=
../src/.libs
# for OS X
cd
python
python setup.py build
--cpp_implementation
python setup.py
test
--cpp_implementation
python setup.py sdist
--cpp_implementation
sudo
pip
install
virtualenv
&&
virtualenv /tmp/protoenv
&&
/tmp/protoenv/bin/pip
install
dist/
*
cd
..
}
...
...
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