-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
66 lines (55 loc) · 1.82 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
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import pathlib
import pkg_resources
from setuptools import find_namespace_packages, find_packages, setup
def fetch_requirements():
with pathlib.Path("requirements.txt").open() as requirements_txt:
install_requires = [
str(requirement)
for requirement in pkg_resources.parse_requirements(requirements_txt)
]
return install_requires
def get_version():
init_py_path = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "vissl", "__init__.py"
)
init_py = open(init_py_path, "r").readlines()
version_line = [l.strip() for l in init_py if l.startswith("__version__")][0]
version = version_line.split("=")[-1].strip().strip("'\"")
return version
packages = find_packages(exclude=("tests",)) + find_namespace_packages(
include=["hydra_plugins.*"]
)
setup(
name="vissl",
version=get_version(),
author="Facebook AI Research",
author_email="vissl@fb.com",
license="MIT",
url="https://github.com/facebookresearch/vissl",
description="VISSL is an extensible, modular and scalable library for "
"SOTA Self-Supervised Learning with images.",
packages=packages,
install_requires=fetch_requirements(),
include_package_data=True,
python_requires=">=3.6.2",
extras_require={
"dev": [
"black==19.3b0",
"sphinx",
"isort==5.7.0",
"flake8==3.8.1",
"flake8-bugbear",
"flake8-comprehensions",
"pre-commit",
"nbconvert",
"bs4",
"faiss-gpu",
"pycocotools>=2.0.1",
"tensorboard>=1.15",
]
},
)