/
setup.py
53 lines (44 loc) · 1.48 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
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2016--, redbiom development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------------------------------------------------------------
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
# based on http://stackoverflow.com/a/36902139
def _post():
import nltk
nltk.download('stopwords')
nltk.download('punkt')
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
_post()
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
_post()
# adapted from q2cli's setup.py
setup(
name='redbiom',
version='2017.0.0.dev0',
license='BSD-3-Clause',
url='https://github.com/wasade/biocore',
packages=find_packages(),
include_package_data=True,
install_requires=['click >= 6.7', 'biom-format >= 2.1.5', 'requests',
'pandas', 'nltk', 'joblib'],
#scripts=['bin/tab-redbiom'],
entry_points='''
[console_scripts]
redbiom=redbiom.commands:cli
''',
cmdclass={'install': PostInstallCommand,
'develop': PostDevelopCommand}
)