imashutosh commited on
Commit
89a2e2f
·
1 Parent(s): 05b87d1

Upload setup.py

Browse files
Files changed (1) hide show
  1. setup.py +36 -0
setup.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from setuptools import find_packages, setup
2
+ from typing import List
3
+
4
+ HYPEN_E_DOT = '-e .'
5
+
6
+ def get_requirements(file_path:str)->List[str]:
7
+ """The function `get_requirements` reads a file and returns a list of requirements, removing any
8
+ occurrences of the "-e.".
9
+
10
+ Param: file_path (str) -- The file path is a string that represents the path to the file containing the
11
+ requirements
12
+
13
+ returns: A list of requirements.
14
+ """
15
+ requirements = []
16
+ with open(file_path) as file_obj:
17
+ requirements = file_obj.readlines()
18
+ requirements = [req.replace("\n","") for req in requirements]
19
+
20
+ if HYPEN_E_DOT in requirements:
21
+ requirements.remove(HYPEN_E_DOT)
22
+
23
+ return requirements
24
+
25
+ #setup - project informations, name, version etc
26
+ # The `setup()` function is a function provided by the `setuptools` library in Python. It is used to
27
+ # define the metadata and configuration options for a Python package.
28
+
29
+ setup(
30
+ name= "Dimond Price Prediction",
31
+ version= "0.0.1",
32
+ author= "Ashutosh Vaidya",
33
+ author_email= "ashutosh.vaidya1190@gmail.com",
34
+ install_requires= get_requirements("requirements.txt"),
35
+ packages= find_packages()
36
+ )