From bb51f0a21944d1ce2b3c9f0de4c19e52c6f6a099 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Wed, 22 Mar 2017 19:34:56 +0800 Subject: [PATCH] set PROTOBUF_VERSION in setup.py --- cmake/external/protobuf.cmake | 3 ++- paddle/setup.py.in | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 446a7532c55..ad1426fd940 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 03db5eb3a95..549baa086d5 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', -- GitLab