diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 446a7532c55bd3ca66662efe70db93551580b8cc..ad1426fd940c7b163668c33d41731fe75d89dd89 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -14,7 +14,8 @@ INCLUDE(ExternalProject) -FIND_PACKAGE(Protobuf 3.1) +set(PROTOBUF_VERSION 3.1) +FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION}) IF(PROTOBUF_FOUND) EXEC_PROGRAM(${PROTOBUF_PROTOC_EXECUTABLE} ARGS --version OUTPUT_VARIABLE PROTOBUF_VERSION) diff --git a/paddle/setup.py.in b/paddle/setup.py.in index 03db5eb3a957d8cd1cd7552918decc2122cf3d8f..549baa086d5aa49498a8fa3bcdb0bd16b89a35dc 100644 --- a/paddle/setup.py.in +++ b/paddle/setup.py.in @@ -16,13 +16,13 @@ from setuptools import setup, Extension setup(name="py_paddle", - version="@PADDLE_VERSION@", + version="${PADDLE_VERSION}", packages=['py_paddle'], include_package_data=True, package_data={'py_paddle':['*.py','_swig_paddle.so']}, install_requires = [ 'numpy>=1.8.0', # The numpy is required. - 'protobuf>=@PROTOBUF_VERSION@' # The paddle protobuf version + 'protobuf>=${PROTOBUF_VERSION}' # The paddle protobuf version ], url='http://www.paddlepaddle.org/', license='Apache 2.0',