Skip to content

Commit a7ae2b6

Browse files
committed
finished setup.py
1 parent 8cc9118 commit a7ae2b6

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
python-dotenv
22
pandas
33
numpy
4+
pymongo
5+
certifi
6+
7+
# -e .

setup.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from setuptools import setup, find_packages
2+
from typing import List
3+
4+
def get_requirements() -> List[str]:
5+
"""
6+
This function will return the list of requirements
7+
"""
8+
requirement_list: List[str] = []
9+
10+
try:
11+
with open("requirements.txt", "r") as file:
12+
# reading lines
13+
lines = file.readlines()
14+
15+
# processing linkes
16+
for line in lines:
17+
requirement = line.strip()
18+
19+
# ignoring empty lines and -e .
20+
if requirement and requirement != "-e .":
21+
requirement_list.append(requirement)
22+
except FileNotFoundError:
23+
print("requirements.txt file not found. No dependencies will be installed.")
24+
25+
return requirement_list
26+
27+
28+
setup(
29+
name="Network Security",
30+
version="0.0.1",
31+
author="Aryan Ahuja",
32+
author_email="[email protected]",
33+
packages=find_packages(),
34+
install_requires=get_requirements(),
35+
)

0 commit comments

Comments
 (0)