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 4.0 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  1. # Ultralytics YOLO 🚀, AGPL-3.0 license
  2. import re
  3. from pathlib import Path
  4. from setuptools import setup
  5. # Settings
  6. FILE = Path(__file__).resolve()
  7. PARENT = FILE.parent # root directory
  8. README = (PARENT / 'README.md').read_text(encoding='utf-8')
  9. def get_version():
  10. """
  11. Retrieve the version number from the 'ultralytics/__init__.py' file.
  12. Returns:
  13. (str): The version number extracted from the '__version__' attribute in the 'ultralytics/__init__.py' file.
  14. """
  15. file = PARENT / 'ultralytics/__init__.py'
  16. return re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', file.read_text(encoding='utf-8'), re.M)[1]
  17. def parse_requirements(file_path: Path):
  18. """
  19. Parse a requirements.txt file, ignoring lines that start with '#' and any text after '#'.
  20. Args:
  21. file_path (str | Path): Path to the requirements.txt file.
  22. Returns:
  23. (List[str]): List of parsed requirements.
  24. """
  25. requirements = []
  26. for line in Path(file_path).read_text().splitlines():
  27. line = line.strip()
  28. if line and not line.startswith('#'):
  29. requirements.append(line.split('#')[0].strip()) # ignore inline comments
  30. return requirements
  31. setup(
  32. name='ultralytics', # name of pypi package
  33. version=get_version(), # version of pypi package
  34. python_requires='>=3.8',
  35. license='AGPL-3.0',
  36. description=('Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, '
  37. 'pose estimation and image classification.'),
  38. long_description=README,
  39. long_description_content_type='text/markdown',
  40. url='https://github.com/ultralytics/ultralytics',
  41. project_urls={
  42. 'Bug Reports': 'https://github.com/ultralytics/ultralytics/issues',
  43. 'Funding': 'https://ultralytics.com',
  44. 'Source': 'https://github.com/ultralytics/ultralytics'},
  45. author='Ultralytics',
  46. author_email='hello@ultralytics.com',
  47. packages=['ultralytics'] + [str(x) for x in Path('ultralytics').rglob('*/') if x.is_dir() and '__' not in str(x)],
  48. package_data={
  49. '': ['*.yaml'],
  50. 'ultralytics.assets': ['*.jpg']},
  51. include_package_data=True,
  52. install_requires=parse_requirements(PARENT / 'requirements.txt'),
  53. extras_require={
  54. 'dev': [
  55. 'ipython',
  56. 'check-manifest',
  57. 'pre-commit',
  58. 'pytest',
  59. 'pytest-cov',
  60. 'coverage',
  61. 'mkdocs-material',
  62. 'mkdocstrings[python]',
  63. 'mkdocs-redirects', # for 301 redirects
  64. 'mkdocs-ultralytics-plugin>=0.0.34', # for meta descriptions and images, dates and authors
  65. ],
  66. 'export': [
  67. 'coremltools>=7.0',
  68. 'openvino-dev>=2023.0',
  69. 'tensorflow<=2.13.1', # TF bug https://github.com/ultralytics/ultralytics/issues/5161
  70. 'tensorflowjs', # automatically installs tensorflow
  71. ], },
  72. classifiers=[
  73. 'Development Status :: 4 - Beta',
  74. 'Intended Audience :: Developers',
  75. 'Intended Audience :: Education',
  76. 'Intended Audience :: Science/Research',
  77. 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
  78. 'Programming Language :: Python :: 3',
  79. 'Programming Language :: Python :: 3.8',
  80. 'Programming Language :: Python :: 3.9',
  81. 'Programming Language :: Python :: 3.10',
  82. 'Programming Language :: Python :: 3.11',
  83. 'Topic :: Software Development',
  84. 'Topic :: Scientific/Engineering',
  85. 'Topic :: Scientific/Engineering :: Artificial Intelligence',
  86. 'Topic :: Scientific/Engineering :: Image Recognition',
  87. 'Operating System :: POSIX :: Linux',
  88. 'Operating System :: MacOS',
  89. 'Operating System :: Microsoft :: Windows', ],
  90. keywords='machine-learning, deep-learning, vision, ML, DL, AI, YOLO, YOLOv3, YOLOv5, YOLOv8, HUB, Ultralytics',
  91. entry_points={'console_scripts': ['yolo = ultralytics.cfg:entrypoint', 'ultralytics = ultralytics.cfg:entrypoint']})
Tip!

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

Comments

Loading...