Skip to content

Commit bb51f0a

Browse files
committed
set PROTOBUF_VERSION in setup.py
1 parent 8d10846 commit bb51f0a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmake/external/protobuf.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
INCLUDE(ExternalProject)
1616

17-
FIND_PACKAGE(Protobuf 3.1)
17+
set(PROTOBUF_VERSION 3.1)
18+
FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION})
1819

1920
IF(PROTOBUF_FOUND)
2021
EXEC_PROGRAM(${PROTOBUF_PROTOC_EXECUTABLE} ARGS --version OUTPUT_VARIABLE PROTOBUF_VERSION)

paddle/setup.py.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
from setuptools import setup, Extension
1717

1818
setup(name="py_paddle",
19-
version="@PADDLE_VERSION@",
19+
version="${PADDLE_VERSION}",
2020
packages=['py_paddle'],
2121
include_package_data=True,
2222
package_data={'py_paddle':['*.py','_swig_paddle.so']},
2323
install_requires = [
2424
'numpy>=1.8.0', # The numpy is required.
25-
'protobuf>=@PROTOBUF_VERSION@' # The paddle protobuf version
25+
'protobuf>=${PROTOBUF_VERSION}' # The paddle protobuf version
2626
],
2727
url='http://www.paddlepaddle.org/',
2828
license='Apache 2.0',

0 commit comments

Comments
 (0)