-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
49 lines (40 loc) · 1.59 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
import codecs
import os.path
import re
from os.path import abspath, dirname, join
from setuptools import find_packages, setup
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
return fp.read()
def parse_requirements(filename):
line_iter = (line.strip() for line in open(filename))
return [line for line in line_iter if line and not line.startswith("#")]
README_MD = open(join(dirname(abspath(__file__)), "README.md")).read()
PACKAGE_NAME = "selfclean"
SOURCE_DIRECTORY = "src"
SOURCE_PACKAGE_REGEX = re.compile(rf"^{SOURCE_DIRECTORY}")
source_packages = find_packages(include=[SOURCE_DIRECTORY, f"{SOURCE_DIRECTORY}.*"])
proj_packages = [
SOURCE_PACKAGE_REGEX.sub(PACKAGE_NAME, name) for name in source_packages
]
setup(
name=PACKAGE_NAME,
packages=proj_packages,
package_dir={PACKAGE_NAME: SOURCE_DIRECTORY},
version="0.0.31",
author="Fabian Groeger",
author_email="[email protected]",
description="A holistic self-supervised data cleaning strategy to detect irrelevant samples, near duplicates and label errors.",
long_description=README_MD,
long_description_content_type="text/markdown",
url="https://github.com/Digital-Dermatology/SelfClean",
python_requires=">=3.6",
install_requires=parse_requirements("requirements.txt"),
setup_requires=parse_requirements("requirements.txt"),
extras_require={"approximate_nn": ["annoy"]},
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
)