[fix][setup] remove un-need files to avoid extreme long path in win (#111)

* [fix][setup] rm un-need files to avoid extreme long path in win

* [fix][setup] rm un-need files to avoid extreme long path in win
This commit is contained in:
DefTruth
2022-08-14 23:26:27 +08:00
committed by GitHub
parent 8ea90e6575
commit 85bd24ab78

View File

@@ -461,6 +461,14 @@ if sys.argv[1] == "install" or sys.argv[1] == "bdist_wheel":
all_files = get_all_files(os.path.join(PACKAGE_NAME, "libs"))
for f in all_files:
# remove un-need ocv samples files to avoid too long file path
# in windows which can make building process failed.
if f.find(".vcxproj.") > 0:
continue
if f.find("opencv") > 0 and (f.find("samples") > 0 or
f.find("java") > 0 or
f.find(".png") > 0 or f.find(".jpg")):
continue
package_data[PACKAGE_NAME].append(os.path.relpath(f, PACKAGE_NAME))
setuptools.setup(