Spaces:
Configuration error
Configuration error
Download setup.py from Waseem2106/network-security: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/Waseem2106/network-security/resolve/main/setup.py
- Command line
-
hf download hf://spaces/Waseem2106/network-security/setup.py
-
curl -L -o setup.py https://huggingface.co/spaces/Waseem2106/network-security/resolve/main/setup.py
1.18 kB
| ''' | |
| The setup.py file is an essential part of packages and distrubution | |
| python projects. Is is used by setup tools (or distutils in older python version) | |
| to define the configuration of your project. | |
| such as its metadata,dependencies, and more. | |
| ''' | |
| from setuptools import find_packages,setup | |
| from typing import List | |
| def get_requirements()->List[str]: | |
| requirement_lst:List[str]=[] | |
| """ | |
| this function will return list of requirements | |
| """ | |
| try: | |
| with open('requirements.txt','r') as file: | |
| ##Read lines from the file | |
| lines=file.readlines() | |
| ##Process each line | |
| for line in lines: | |
| requirement=line.strip() | |
| ##Igore empty lines and -e. | |
| if requirement and requirement!='-e.': | |
| requirement_lst.append(requirement) | |
| except FileNotFoundError: | |
| print("Requirements.txt file not found") | |
| return requirement_lst | |
| print(get_requirements()) | |
| setup( | |
| name="Network SEcurity", | |
| version="0.0.1", | |
| author="Waseem Ahmad", | |
| packages=find_packages(), | |
| install_requires=get_requirements() | |
| ) | |