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
4573e110
Commit
4573e110
authored
Mar 05, 2015
by
Jisi Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix python versions to comply with pep-0440.
Change-Id: Ifb4958e4f371b36f249faa466473f851697edb5c
parent
e4a9ace5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
__init__.py
python/google/protobuf/__init__.py
+1
-1
setup.py
python/setup.py
+13
-1
No files found.
python/google/protobuf/__init__.py
View file @
4573e110
...
@@ -32,4 +32,4 @@
...
@@ -32,4 +32,4 @@
#
#
# Copyright 2007 Google Inc. All Rights Reserved.
# Copyright 2007 Google Inc. All Rights Reserved.
__version__
=
'3.0.0
-alpha-3-pre
'
__version__
=
'3.0.0
a3.dev0
'
python/setup.py
View file @
4573e110
...
@@ -44,6 +44,18 @@ elif os.path.exists("../vsprojects/Release/protoc.exe"):
...
@@ -44,6 +44,18 @@ elif os.path.exists("../vsprojects/Release/protoc.exe"):
else
:
else
:
protoc
=
find_executable
(
"protoc"
)
protoc
=
find_executable
(
"protoc"
)
def
GetVersion
():
"""Gets the version from google/protobuf/__init__.py
Do not import google.protobuf.__init__ directly, because an installed protobuf
library may be loaded instead.
"""
with
open
(
os
.
path
.
join
(
'google'
,
'protobuf'
,
'__init__.py'
))
as
version_file
:
exec
(
version_file
.
read
())
return
__version__
def
generate_proto
(
source
):
def
generate_proto
(
source
):
"""Invokes the Protocol Compiler to generate a _pb2.py from the given
"""Invokes the Protocol Compiler to generate a _pb2.py from the given
.proto file. Does nothing if the output already exists and is newer than
.proto file. Does nothing if the output already exists and is newer than
...
@@ -150,7 +162,7 @@ if __name__ == '__main__':
...
@@ -150,7 +162,7 @@ if __name__ == '__main__':
os
.
environ
[
'PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'
]
=
'cpp'
os
.
environ
[
'PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'
]
=
'cpp'
setup
(
name
=
'protobuf'
,
setup
(
name
=
'protobuf'
,
version
=
'3.0.0-alpha-3-pre'
,
version
=
GetVersion
()
,
packages
=
[
'google'
],
packages
=
[
'google'
],
namespace_packages
=
[
'google'
],
namespace_packages
=
[
'google'
],
google_test_dir
=
"google/protobuf/internal"
,
google_test_dir
=
"google/protobuf/internal"
,
...
...
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