forked from ultralytics/ultralytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MANIFEST.in (ultralytics#4894)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
32f7c52
commit daf16ec
Showing
8 changed files
with
18 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
import re | ||
from pathlib import Path | ||
|
||
from setuptools import setup | ||
from setuptools import find_packages, setup | ||
|
||
# Settings | ||
FILE = Path(__file__).resolve() | ||
|
@@ -36,33 +36,6 @@ def parse_requirements(file_path: Path): | |
return requirements | ||
|
||
|
||
def find_packages(start_dir, exclude=()): | ||
""" | ||
Custom implementation of setuptools.find_packages(). Finds all Python packages in a directory. | ||
Args: | ||
start_dir (str | Path, optional): The directory where the search will start. Defaults to the current directory. | ||
exclude (list | tuple, optional): List of package names to exclude. Defaults to None. | ||
Returns: | ||
List[str]: List of package names. | ||
""" | ||
|
||
packages = [] | ||
start_dir = Path(start_dir) | ||
root_package = start_dir.name | ||
|
||
if '__init__.py' in [child.name for child in start_dir.iterdir()]: | ||
packages.append(root_package) | ||
for package in start_dir.rglob('*'): | ||
if package.is_dir() and '__init__.py' in [child.name for child in package.iterdir()]: | ||
package_name = f"{root_package}.{package.relative_to(start_dir).as_posix().replace('/', '.')}" | ||
if package_name not in exclude: | ||
packages.append(package_name) | ||
|
||
return packages | ||
|
||
|
||
setup( | ||
name='ultralytics', # name of pypi package | ||
version=get_version(), # version of pypi package | ||
|
@@ -79,7 +52,10 @@ def find_packages(start_dir, exclude=()): | |
'Source': 'https://github.com/ultralytics/ultralytics'}, | ||
author='Ultralytics', | ||
author_email='[email protected]', | ||
packages=find_packages(start_dir='ultralytics'), # required | ||
packages=find_packages(), # required | ||
package_data={ | ||
'': ['*.yaml'], | ||
'ultralytics.assets': ['*.jpg']}, | ||
include_package_data=True, | ||
install_requires=parse_requirements(PARENT / 'requirements.txt'), | ||
extras_require={ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters