Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup.py 1.5 KB

You have to be logged in to leave a comment. Sign In
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
42
43
44
  1. '''
  2. The setup.py file is a Python file that contains the necessary information to create a Python package.
  3. It is used to define the metadata and dependencies of the package.
  4. '''
  5. from setuptools import find_packages, setup
  6. from typing import List
  7. def get_requirements() -> List[str]:
  8. """
  9. Reads the requirements.txt file and returns a list of dependencies.
  10. Skips the '-e .' entry used for editable installs.
  11. """
  12. requirements: List[str] = []
  13. try:
  14. with open('requirements.txt', 'r') as file:
  15. # process each line
  16. for line in file:
  17. requirement = line.strip()
  18. #ignore empty lines and -e.
  19. if requirement and requirement != '-e .':
  20. requirements.append(requirement)
  21. except FileNotFoundError:
  22. print("requirements.txt file not found. Please ensure it exists.")
  23. return requirements
  24. setup(
  25. name="NetworkSecurity",
  26. version="0.0.1",
  27. author="Augustine Chibueze",
  28. author_email="chibuezeaugustine23@gmail.com",
  29. description="A package for network security-related projects.",
  30. long_description=open("README.md").read(),
  31. long_description_content_type="text/markdown",
  32. url="https://github.com/austinLorenzMccoy/networkSecurity_project",
  33. packages=find_packages(),
  34. install_requires=get_requirements(),
  35. classifiers=[
  36. "Programming Language :: Python :: 3",
  37. "License :: OSI Approved :: MIT License",
  38. "Operating System :: OS Independent",
  39. ],
  40. python_requires=">=3.8",
  41. )
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...