forked from ultralytics/yolov5
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from neuralmagic/auto-package
Auto package Yolov5
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include *.md | ||
include LICENSE | ||
include setup.py | ||
recursive-include yolov5/data * | ||
recursive-include yolov5/models * | ||
recursive-include yolov5/models_v5.0 * | ||
include yolov5/requirements.txt |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
python3 -m pip install --upgrade build | ||
mkdir yolov5 | ||
cp -r data models models_v5.0 utils .pre-commit-config.yaml $(ls *.py) requirements.txt yolov5/ | ||
grep --include=\*.py -rnl 'yolov5/' -e "from models" | xargs -i@ sed -i 's/from models/from yolov5.models/g' @ | ||
grep --include=\*.py -rnl 'yolov5/' -e "from utils" | xargs -i@ sed -i 's/from utils/from yolov5.utils/g' @ | ||
sed -i '$d' yolov5/requirements.txt | ||
cat > yolov5/__init__.py << EOF | ||
from yolov5.utils.general import NM_INTEGRATED | ||
EOF | ||
python3 -m build | ||
rm -r yolov5 |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools>=42"] | ||
build-backend = "setuptools.build_meta" |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import setuptools | ||
import os | ||
|
||
def read_requirements(): | ||
build_dir = os.path.abspath(os.path.dirname(__file__)) | ||
with open(os.path.join(build_dir, "yolov5", "requirements.txt")) as f: | ||
return f.read().splitlines() | ||
|
||
setuptools.setup( | ||
name="yolov5", | ||
version='6.1.0', | ||
author="", | ||
long_description=open("README.md", "r", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/ultralytics/yolov5", | ||
packages=['yolov5', 'yolov5.models', 'yolov5.utils'], | ||
python_requires=">=3.6", | ||
install_requires=read_requirements(), | ||
include_package_data=True, | ||
package_data={'': ['yolov5/models/*.yaml', 'yolov5/data/*']}, | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: GNU General Public License (GPL)", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Education", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
] | ||
) |
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