Skip to content

Commit

Permalink
Merge pull request #3419 from luotao1/setup_requests
Browse files Browse the repository at this point in the history
auto update the requirements in .travis.yml with python/setup.py.in
  • Loading branch information
wangkuiyi authored Aug 12, 2017
2 parents b7ea587 + 0dc9c6c commit 452f3cc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ before_install:
- if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
# Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
# protobuf version.
- pip install numpy wheel 'protobuf==3.1' sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit requests==2.9.2 LinkChecker
- pip install rarfile nltk==3.2.2 scipy==0.19.0 recordio matplotlib Pillow
- pip install -r $TRAVIS_BUILD_DIR/python/requirements.txt
- pip install wheel sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit LinkChecker
- curl https://glide.sh/get | bash
- eval "$(GIMME_GO_VERSION=1.8.3 gimme)"
- go get -u github.com/alecthomas/gometalinter
Expand Down
9 changes: 9 additions & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
requests==2.9.2
numpy>=1.12
protobuf==3.1
recordio
matplotlib
rarfile
scipy>=0.19.0
Pillow
nltk>=3.2.2
12 changes: 2 additions & 10 deletions python/setup.py.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup, Distribution

class BinaryDistribution(Distribution):
def has_ext_modules(foo):
return True
Expand All @@ -18,15 +17,8 @@ packages=['paddle',
'paddle.v2.framework.proto',
'py_paddle']

setup_requires=["requests",
"numpy>=1.12",
"protobuf==3.1",
"recordio",
"matplotlib",
"rarfile",
"scipy>=0.19.0",
"Pillow",
"nltk>=3.2.2"]
with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
setup_requires = f.read().splitlines()

if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
setup_requires+=["opencv-python"]
Expand Down

0 comments on commit 452f3cc

Please sign in to comment.