-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
60 lines (46 loc) · 1.35 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
# © 2020 Nokia
#
# Licensed under the BSD 3 Clause license
#
# SPDX-License-Identifier: BSD-3-Clause
# ============================================
import subprocess
import os
from setuptools import setup
from setuptools import find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
from codesearch import __version__
def get_requirements():
requirements = [
'Click',
'tree-sitter',
'spacy',
'dill',
'scikit-learn==0.22.1',
# this fastText version fixes a memory leak in the current release
'fastText @ git+https://github.com/facebookresearch/fastText@02c61efaa6d60d6bb17e6341b790fa199dfb8c83',
'rank-bm25',
'ipywidgets',
'pandas',
"tqdm"
]
if os.environ.get("INSTALL_TF", True):
requirements.append('tensorflow>=2.0')
requirements.append('tensorflow_hub')
if os.environ.get("INSTALL_TORCH", True):
requirements.append('torch')
if os.environ.get("INSTALL_FASTAI", True):
requirements.append('fastai')
return requirements
setup(
name='codesearch',
version=__version__,
python_requires='>=3.6',
packages=find_packages(),
install_requires=get_requirements(),
entry_points="""
[console_scripts]
codesearch=codesearch.cli:cli
"""
)