setup.py.in 1.9 KB
Newer Older
1 2 3 4
from setuptools import setup, Distribution
class BinaryDistribution(Distribution):
    def has_ext_modules(foo):
        return True
Z
zhangjinchao01 已提交
5 6 7 8 9

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

20 21
with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
    setup_requires = f.read().splitlines()
22 23 24 25

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

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