forked from pyro-ppl/pyro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
95 lines (89 loc) · 2.77 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
from __future__ import absolute_import, division, print_function
import sys
from setuptools import find_packages, setup
# Find pyro version.
for line in open('pyro/__init__.py'):
if line.startswith('__version__ = '):
version = line.strip().split()[2][1:-1]
# Convert README.md to rst for display at https://pypi.python.org/pypi/pyro-ppl
# When releasing on pypi, make sure pandoc is on your system:
# $ brew install pandoc # OS X
# $ sudo apt-get install pandoc # Ubuntu Linux
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError, OSError) as e:
sys.stderr.write('Failed to convert README.md to rst:\n {}\n'.format(e))
sys.stderr.flush()
long_description = open('README.md').read()
# Remove badges since they will always be obsolete.
blacklist = ['Build Status', 'Latest Version', 'travis-ci.org', 'pypi.python.org']
long_description = '\n'.join([
line for line in long_description.split('\n')
if not any(patt in line for patt in blacklist)
])
setup(
name='pyro-ppl',
version=version,
description='A Python library for probabilistic modeling and inference',
long_description=long_description,
packages=find_packages(exclude=('tests*',)),
url='http://pyro.ai',
author='Uber AI Labs',
author_email='pyro@uber.com',
install_requires=[
'numpy>=1.7',
'scipy>=0.19.0',
'cloudpickle>=0.3.1',
'graphviz>=0.8',
'networkx>=2.0.0',
'observations>=0.1.4',
'torch',
'six>=1.10.0',
],
extras_require={
'notebooks': ['jupyter>=1.0.0'],
'visualization': [
'matplotlib>=1.3',
'visdom>=0.1.4',
'pillow',
],
'test': [
'pytest',
'pytest-cov',
'nbval',
# examples/tutorials
'visdom',
'torchvision',
],
'profile': [
'prettytable'
],
'dev': [
'torchvision',
'flake8',
'yapf',
'isort',
'pytest',
'pytest-xdist',
'nbval',
'nbstripout',
'pypandoc',
'sphinx',
'sphinx_rtd_theme',
],
},
tests_require=['flake8', 'pytest'],
keywords='machine learning statistics probabilistic programming bayesian modeling pytorch',
license='MIT License',
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
# yapf
)