File tree 7 files changed +542
-7
lines changed
7 files changed +542
-7
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -70,10 +70,14 @@ Licensing
70
70
---------
71
71
72
72
Opencv-python package (scripts in this repository) is available under
73
- MIT license. The OpenCV itself is available under `3-clause BSD
73
+ MIT license.
74
+
75
+ OpenCV itself is available under `3-clause BSD
74
76
License <https://github.com/opencv/opencv/blob/master/LICENSE> `__
75
77
(`LICENSE-3RD-PARTY.txt <https://github.com/skvark/opencv-python/blob/master/LICENSE-3RD-PARTY.txt >`__).
76
78
79
+ This software uses code of `FFmpeg <http://ffmpeg.org >`__ licensed under the `LGPLv2.1 <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html >`__.
80
+
77
81
Versioning
78
82
----------
79
83
@@ -137,4 +141,4 @@ supported by the manylinux containers.
137
141
OS X
138
142
~~~~
139
143
140
- Currently built for Python 2.7 and 3.4 .
144
+ Currently built for Python 2.7, 3.4 and 3.5 .
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ install:
29
29
C:\Python35-x64\python.exe -m pip install -r requirements.txt
30
30
31
31
build_script :
32
- - cmd : > -
32
+ - cmd : | -
33
33
34
34
if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\build" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\build"
35
35
@@ -52,36 +52,46 @@ build_script:
52
52
cmake --build . --config Release
53
53
54
54
cd ..\..
55
-
55
+ cd
56
56
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\RELEASE\*.pyd" cv2
57
+ xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\bin\Release\*.dll" cv2
58
+ del cv2\*64.dll
57
59
58
60
C:\Python27\python.exe setup.py bdist_wheel
59
61
60
62
del cv2\*.pyd
63
+ del cv2\*.dll
61
64
62
65
rmdir "%APPVEYOR_BUILD_FOLDER%\build" /s /q
63
66
64
67
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\RELEASE\*.pyd" cv2
68
+ xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\bin\Release\*64.dll" cv2
65
69
66
70
C:\Python27-x64\python.exe setup.py bdist_wheel
67
71
68
72
del cv2\*.pyd
73
+ del cv2\*.dll
69
74
70
75
rmdir "%APPVEYOR_BUILD_FOLDER%\build" /s /q
71
76
72
77
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\python3\Release\*.pyd" cv2
78
+ xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\bin\Release\*.dll" cv2
79
+ del cv2\*64.dll
73
80
74
81
C:\Python35\python.exe setup.py bdist_wheel
75
82
76
83
del cv2\*.pyd
84
+ del cv2\*.dll
77
85
78
86
rmdir "%APPVEYOR_BUILD_FOLDER%\build" /s /q
79
87
80
88
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\python3\Release\*.pyd" cv2
89
+ xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\bin\Release\*64.dll" cv2
81
90
82
91
C:\Python35-x64\python.exe setup.py bdist_wheel
83
92
84
93
del cv2\*.pyd
94
+ del cv2\*.dll
85
95
86
96
rmdir "%APPVEYOR_BUILD_FOLDER%\build" /s /q
87
97
Original file line number Diff line number Diff line change 1
1
import sys
2
+ import os
3
+
4
+ # FFMPEG dll is not found on Windows without this
5
+ os .environ ["PATH" ] += os .pathsep + os .path .dirname (os .path .realpath (__file__ ))
6
+
2
7
from . import cv2
3
8
sys .modules ['cv2' ] = cv2
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def is_pure(self):
33
33
if os .name == 'posix' :
34
34
package_data ['cv2' ] = ['*.so' ]
35
35
else :
36
- package_data ['cv2' ] = ['*.pyd' ]
36
+ package_data ['cv2' ] = ['*.pyd' , '*.dll' ]
37
37
38
38
setup (name = 'opencv-python' ,
39
39
version = opencv_version ,
Original file line number Diff line number Diff line change 1
1
import unittest
2
+ import os
2
3
3
4
class OpenCVTest (unittest .TestCase ):
4
5
""" Simple functionality tests. """
5
6
6
7
def test_import (self ):
7
8
""" Test that the cv2 module can be imported. """
8
- import cv2
9
+ import cv2
10
+
11
+ def test_video_capture (self ):
12
+
13
+ if os .name != 'posix' :
14
+ import cv2
15
+
16
+ cap = cv2 .VideoCapture ("SampleVideo_1280x720_1mb.mp4" )
17
+ self .assertTrue (cap .isOpened ())
You can’t perform that action at this time.
0 commit comments