setup.py.in 2.0 KB
Newer Older
1 2 3 4 5
from setuptools import setup, Distribution

class BinaryDistribution(Distribution):
    def has_ext_modules(foo):
        return True
Z
zhangjinchao01 已提交
6 7 8 9 10

packages=['paddle',
          'paddle.proto',
          'paddle.trainer',
          'paddle.trainer_config_helpers',
Q
qiaolongfei 已提交
11
          'paddle.utils',
Y
Yu Yang 已提交
12 13
          'paddle.v2',
          'paddle.v2.dataset',
Y
Yancey1989 已提交
14
          'paddle.v2.reader',
H
Helin Wang 已提交
15
          'paddle.v2.master',
16 17
          'paddle.v2.plot',
          'paddle.v2.framework',
18 19
          'paddle.v2.framework.proto',
          'py_paddle']
Z
zhangjinchao01 已提交
20

21
setup_requires=["requests",
Y
Yu Yang 已提交
22
                "numpy>=1.12",
23
                "protobuf==3.1",
G
gongweibao 已提交
24
                "recordio",
25
                "matplotlib",
26
                "rarfile",
27
                "scipy>=0.19.0",
28
                "Pillow",
29
                "nltk>=3.2.2"]
30 31 32 33

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

34
setup(name='paddlepaddle',
Z
zhangjinchao01 已提交
35 36
      version='${PADDLE_VERSION}',
      description='Parallel Distributed Deep Learning',
37
      install_requires=setup_requires,
L
Luo Tao 已提交
38
      packages=packages,
39 40 41 42
      package_data={
        'paddle.v2.master': ['libpaddle_master.so'],
        'paddle.v2.framework': ['core.so'],
        'py_paddle':['*.py','_swig_paddle.so']
43
      },
Z
zhangjinchao01 已提交
44
      package_dir={
45 46 47
          '': '${CMAKE_CURRENT_SOURCE_DIR}',
          # The paddle.v2.framework.proto will be generated while compiling.
          # So that package points to other directory.
48 49
          'paddle.v2.framework.proto': '${PROJ_BINARY_ROOT}/paddle/framework',
          'py_paddle': '${PROJ_ROOT}/paddle/py_paddle'
50
      },
51 52 53 54 55 56 57
      scripts=['${PROJ_BINARY_ROOT}/paddle/scripts/paddle'],
      distclass=BinaryDistribution,
      data_files=[('/usr/local/opt/paddle/bin',
                       ['${PROJ_BINARY_ROOT}/paddle/scripts/paddle_usage',
                        '${PROJ_BINARY_ROOT}/paddle/trainer/paddle_trainer',
                        '${PROJ_BINARY_ROOT}/paddle/trainer/paddle_merge_model',
                        '${PROJ_BINARY_ROOT}/paddle/pserver/paddle_pserver_main'])]
Z
zhangjinchao01 已提交
58
)