-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (37 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
from setuptools import setup, find_packages
from typing import List
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
REPO_NAME = "aiClassification"
AUTHOR_USER_NAME = "sanjeev49"
SRC_REPO = "src"
REQUIREMENT_FILE_NAME = "requirements.txt"
HYPHEN_E_DOT = "-e ."
def get_requirements_list() -> List[str]:
"""
Description: This function is going to return list of requirement
mention in requirements.txt file
return: This function is going to return a list which contain name
of libraries mentioned in requirements.txt file
"""
with open(REQUIREMENT_FILE_NAME) as requirement_file:
requirement_list = requirement_file.readlines()
requirement_list = [requirement_name.replace("\n", "") for requirement_name in requirement_list]
if HYPHEN_E_DOT in requirement_list:
requirement_list.remove(HYPHEN_E_DOT)
return requirement_list
setup(
name=SRC_REPO,
version="0.0.2",
author=AUTHOR_USER_NAME,
description="A small package for DVC",
long_description=long_description,
long_description_content_type="text/markdown",
url=f"https://github.com/{AUTHOR_USER_NAME}/{REPO_NAME}",
author_email="sanjeevkr4983@gmail.com",
packages=[SRC_REPO],
license="MIT",
python_requires=">=3.7",
install_requires=get_requirements_list()
)
print('hi')