-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
41 lines (31 loc) · 1.16 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
#
from setuptools import find_packages, setup
from typing import List
# defining a constant
HYPHEN_E_DOT = '-e .'
def get_requirements(file_path: str) -> List[str]:
'''
this function will return a list of requirements
'''
# Initialize an empty list named requirements
requirements = []
with open(file_path) as file_obj:
# Reading lines from the file and storing them in the list
requirements = file_obj.readlines()
# Removing the newline characters
[req.replace("\n", "")for req in requirements]
if HYPHEN_E_DOT in requirements:
requirements.remove(HYPHEN_E_DOT)
return requirements
setup(
name='SupermarketSales',
version='0.0.1',
author='Juliane',
author_email='[email protected]',
# will consider any folder with an __init__.py file as a package
# and when we run this find_packages() function it will build them
packages=find_packages(),
# when there are too many packages
# ##it is best to create a fct using the requirements.txt file as an input
install_requires=get_requirements('requirements.txt'),
)