Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_51672696
opencv-python
提交
b8765378
O
opencv-python
项目概览
weixin_51672696
/
opencv-python
与 Fork 源项目一致
Fork自
OpenCV / opencv-python
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv-python
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b8765378
编写于
5月 19, 2016
作者:
O
Olli-Pekka Heinisuo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify versioning and tests
上级
18a247cb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
59 addition
and
31 deletion
+59
-31
appveyor.yml
appveyor.yml
+18
-10
find_version.py
find_version.py
+23
-0
setup.py
setup.py
+10
-21
tests/test.py
tests/test.py
+8
-0
未找到文件。
appveyor.yml
浏览文件 @
b8765378
version
:
'
{build}'
install
:
install
:
-
cmd
:
>-
-
cmd
:
>-
git clone -q --branch=master https://github.com/Itseez/opencv.git "%APPVEYOR_BUILD_FOLDER%\opencv
git clone -q --branch=master https://github.com/Itseez/opencv.git "%APPVEYOR_BUILD_FOLDER%\opencv
C:\Python35\python.exe find_version.py > tmp
set /p opencv_version= < tmp
del tmp
echo %opencv_version%
C:\Python27\python.exe -m pip install --upgrade pip
C:\Python27\python.exe -m pip install --upgrade pip
...
@@ -21,6 +27,8 @@ install:
...
@@ -21,6 +27,8 @@ install:
C:\Python35-x64\python.exe -m pip install -r requirements.txt
C:\Python35-x64\python.exe -m pip install -r requirements.txt
version
:
'
%opencv_version%-{build}'
build_script
:
build_script
:
-
cmd
:
>-
-
cmd
:
>-
...
@@ -48,25 +56,25 @@ build_script:
...
@@ -48,25 +56,25 @@ build_script:
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\RELEASE\*.pyd" cv2
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\RELEASE\*.pyd" cv2
C:\Python27\python.exe setup.py bdist_wheel
C:\Python27\python.exe setup.py bdist_wheel
--opencv-version=%opencv_version%
del cv2\*.pyd
del cv2\*.pyd
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\RELEASE\*.pyd" cv2
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\RELEASE\*.pyd" cv2
C:\Python27-x64\python.exe setup.py bdist_wheel
C:\Python27-x64\python.exe setup.py bdist_wheel
--opencv-version=%opencv_version%
del cv2\*.pyd
del cv2\*.pyd
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\python3\Release\*.pyd" cv2
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\python3\Release\*.pyd" cv2
C:\Python35\python.exe setup.py bdist_wheel
C:\Python35\python.exe setup.py bdist_wheel
--opencv-version=%opencv_version%
del cv2\*.pyd
del cv2\*.pyd
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\python3\Release\*.pyd" cv2
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\python3\Release\*.pyd" cv2
C:\Python35-x64\python.exe setup.py bdist_wheel
C:\Python35-x64\python.exe setup.py bdist_wheel
--opencv-version=%opencv_version%
del cv2\*.pyd
del cv2\*.pyd
...
@@ -86,13 +94,13 @@ before_test:
...
@@ -86,13 +94,13 @@ before_test:
test_script
:
test_script
:
-
cmd
:
>-
-
cmd
:
>-
C:\Python27\python.exe -
c "import cv2"
C:\Python27\python.exe -
m unittest tests/test
C:\Python27-x64\python.exe -
c "import cv2"
C:\Python27-x64\python.exe -
m unittest tests/test
C:\Python35\python.exe -
c "import cv2"
C:\Python35\python.exe -
m unittest tests/test
C:\Python35-x64\python.exe -
c "import cv2"
C:\Python35-x64\python.exe -
m unittest tests/test
artifacts
:
artifacts
:
-
path
:
dist\*.whl
-
path
:
dist\*.whl
...
...
find_version.py
0 → 100644
浏览文件 @
b8765378
import
sys
opencv_version
=
""
# dig out the version from OpenCV sources
version_file_path
=
"opencv/modules/core/include/opencv2/core/version.hpp"
with
open
(
version_file_path
,
'r'
)
as
f
:
for
line
in
f
:
words
=
line
.
split
()
if
"CV_VERSION_MAJOR"
in
words
:
opencv_version
+=
words
[
2
]
opencv_version
+=
"."
if
"CV_VERSION_MINOR"
in
words
:
opencv_version
+=
words
[
2
]
opencv_version
+=
"."
if
"CV_VERSION_REVISION"
in
words
:
opencv_version
+=
words
[
2
]
break
sys
.
stdout
.
write
(
opencv_version
)
\ No newline at end of file
setup.py
浏览文件 @
b8765378
...
@@ -4,6 +4,16 @@ import pip
...
@@ -4,6 +4,16 @@ import pip
import
os
import
os
import
sys
import
sys
opencv_version
=
""
if
"--opencv-version"
in
sys
.
argv
:
index
=
sys
.
argv
.
index
(
'--opencv-version'
)
sys
.
argv
.
pop
(
index
)
opencv_version
=
sys
.
argv
.
pop
(
index
)
else
:
print
(
"Error: no version info (--opencv-version missing), exiting."
)
exit
(
1
)
numpy_version
=
""
numpy_version
=
""
# Get required numpy version
# Get required numpy version
...
@@ -11,27 +21,6 @@ for package in pip.get_installed_distributions():
...
@@ -11,27 +21,6 @@ for package in pip.get_installed_distributions():
if
package
.
key
==
"numpy"
:
if
package
.
key
==
"numpy"
:
numpy_version
=
package
.
version
numpy_version
=
package
.
version
opencv_version
=
""
# dig the version from OpenCV sources
version_file_path
=
"opencv/modules/core/include/opencv2/core/version.hpp"
with
open
(
version_file_path
,
'r'
)
as
f
:
for
line
in
f
:
words
=
line
.
split
()
if
"CV_VERSION_MAJOR"
in
words
:
opencv_version
+=
words
[
2
]
opencv_version
+=
"."
if
"CV_VERSION_MINOR"
in
words
:
opencv_version
+=
words
[
2
]
opencv_version
+=
"."
if
"CV_VERSION_REVISION"
in
words
:
opencv_version
+=
words
[
2
]
break
class
BinaryDistribution
(
Distribution
):
class
BinaryDistribution
(
Distribution
):
""" Forces BinaryDistribution. """
""" Forces BinaryDistribution. """
def
has_ext_modules
(
asd
):
def
has_ext_modules
(
asd
):
...
...
tests/test.py
0 → 100644
浏览文件 @
b8765378
import
unittest
class
OpenCVTest
(
unittest
.
TestCase
):
""" Simple functionality tests. """
def
test_import
(
self
):
""" Test that the cv2 module can be imported. """
import
cv2
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录