-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
52 lines (43 loc) · 1.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from setuptools import setup, find_packages
from os.path import join
PROJECT = 'DeepPhysX'
PACKAGE = 'Core'
packages = [f'{PROJECT}']
packages_dir = {f'{PROJECT}': 'src'}
# Configure packages list and directories
for subpackage in find_packages(where='src'):
packages.append(f'{PROJECT}.{subpackage}')
packages_dir[f'{PROJECT}.{subpackage}'] = join('src', *subpackage.split('.'))
# Add examples as subpackages
packages.append(f'{PROJECT}.examples.{PACKAGE}')
packages_dir[f'{PROJECT}.examples.{PACKAGE}'] = 'examples'
for example_dir in find_packages(where='examples'):
packages.append(f'{PROJECT}.examples.{PACKAGE}.{example_dir}')
# Extract README.md content
with open('README.md') as f:
long_description = f.read()
def get_SSD():
# If SSD was installed in dev mode, pip will re-install it
try:
import SSD
except ModuleNotFoundError:
return ['SimulationSimpleDatabase >= 22.12']
return []
# Installation
setup(name=f'{PROJECT}',
version='22.12.1',
description='A Python framework interfacing AI with numerical simulation.',
long_description=long_description,
long_description_content_type='text/markdown',
author='Mimesis',
author_email='[email protected]',
url='https://github.com/mimesis-inria/DeepPhysX',
packages=packages,
package_dir=packages_dir,
namespace_packages=[PROJECT],
install_requires=get_SSD() + ['numpy >= 1.23.5',
'tensorboard >= 2.10.0',
'tensorboardX >= 2.5.1',
'pyDataverse >= 0.3.1',
'torch >= 1.13.0'],
entry_points={'console_scripts': ['DPX=DeepPhysX.cli:execute_cli']})