Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d0bad8

Browse filesBrowse files
committed
add haarcascade xml files to the package
1 parent 49237b5 commit 2d0bad8
Copy full SHA for 2d0bad8

File tree

Expand file treeCollapse file tree

5 files changed

+11
-4
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-4
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ before_install:
203203
- source multibuild/travis_steps.sh
204204
- python find_version.py
205205
- cp LICENSE*.txt cv2/
206+
- cp opencv/data/haarcascades/*.xml cv2/data/
206207
- before_install
207208

208209
install:

‎appveyor/build.cmd

Copy file name to clipboardExpand all lines: appveyor/build.cmd
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if %PYTHON_VERSION% LSS 3 xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\lib\
2626

2727
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\bin\Release\*.dll" .\cv2 /I
2828
xcopy "%APPVEYOR_BUILD_FOLDER%\LICENSE*.txt" .\cv2 /I
29+
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\data\haarcascades\*.xml" .\cv2\data /I
2930

3031
dir
3132

‎cv2/__init__.py

Copy file name to clipboard
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import importlib
2+
import os
23

3-
# make IDE's (PyCharm) autocompletion happy
44
from .cv2 import *
5+
from .data import *
56

67
# wildcard import above does not import "private" variables like __version__
78
# this makes them available
8-
globals().update(importlib.import_module('cv2.cv2').__dict__)
9+
globals().update(importlib.import_module('cv2.cv2').__dict__)

‎cv2/data/__init__.py

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import os
2+
3+
haarcascades = os.path.join(os.path.dirname(__file__), '')

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from setuptools import setup
1+
from setuptools import setup, find_packages
22
from setuptools.dist import Distribution
33
import pip
44
import os
@@ -49,6 +49,7 @@
4949
package_data['cv2'] = ['*.pyd', '*.dll']
5050

5151
package_data['cv2'] += ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]
52+
package_data[''] = ['*.xml']
5253

5354
"""
5455
@@ -80,7 +81,7 @@ def __len__(self):
8081
license='MIT',
8182
description='Wrapper package for OpenCV python bindings.',
8283
long_description=long_description,
83-
packages=['cv2'],
84+
packages=find_packages(),
8485
package_data=package_data,
8586
maintainer="Olli-Pekka Heinisuo",
8687
include_package_data=True,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.