-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
28 lines (25 loc) · 957 Bytes
/
setup.py
File metadata and controls
28 lines (25 loc) · 957 Bytes
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
from setuptools import find_packages, setup
from typing import List
HYPHEN_E_DOT = "-e ."
def get_requirements(file_path: str) -> List[str]:
'''
This function reads the requirements.txt file and returns a list of dependencies.
'''
try:
with open(file_path, 'r') as file:
requirements = file.readlines()
requirements = [req.strip() for req in requirements] # Remove newline characters
if HYPHEN_E_DOT in requirements:
requirements.remove(HYPHEN_E_DOT)
return requirements
except FileNotFoundError:
print(f"Error: {file_path} not found.")
return []
setup(
name='SMS-SPAM-CLASSIFICATION PROJECT',
version='0.0.1',
author='Rahul',
author_email='poojith.p.rahul@gmail.com',
packages=find_packages(), # Automatically finds all packages in the directory
install_requires=get_requirements('requirements.txt') # Reads dependencies
)