Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
conda
Commits
c639de2c
Commit
c639de2c
authored
4 years ago
by
Vincent POLLET
Browse files
Options
Downloads
Patches
Plain Diff
Add test for package integrity
parent
4e3fd1f8
No related branches found
No related tags found
1 merge request
!466
Fix run exports in opencv
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conda/opencv/meta.yaml
+4
-1
4 additions, 1 deletion
conda/opencv/meta.yaml
conda/opencv/run_test_opencv.py
+29
-0
29 additions, 0 deletions
conda/opencv/run_test_opencv.py
with
33 additions
and
1 deletion
conda/opencv/meta.yaml
+
4
−
1
View file @
c639de2c
...
...
@@ -41,7 +41,7 @@ source:
sha256
:
78884f64b564a3b06dc6ee731ed33b60c6d8cd864cea07f21d94ba0f90c7b310
# [unix]
build
:
number
:
0
number
:
1
string
:
py{{ PY_VER_MAJOR }}{{ PY_VER_MINOR }}_{{ PKG_BUILDNUM }}
run_exports
:
# https://abi-laboratory.pro/index.php?view=timeline&l=opencv
...
...
@@ -175,6 +175,9 @@ outputs:
run
:
-
{{
pin_subpackage('libopencv'
,
exact=True)
}}
-
{{
pin_subpackage('py-opencv'
,
exact=True)
}}
-
{{
pin_compatible('setuptools')
}}
test
:
script
:
run_test_opencv.py
-
name
:
py-opencv
build
:
...
...
This diff is collapsed.
Click to expand it.
conda/opencv/run_test_opencv.py
0 → 100644
+
29
−
0
View file @
c639de2c
import
sys
# couple of imports to see if packages are working
import
cv2
import
pkg_resources
def
test_opencv
():
import
cv2
print
(
"
opencv version:
"
,
cv2
.
__version__
)
def
_check_package
(
name
,
pyname
=
None
):
"""
Checks if a Python package can be `require()`
'
d
"""
pyname
=
pyname
or
name
print
(
f
"
Checking Python setuptools integrity for
{
name
}
(pyname:
{
pyname
}
)
"
)
pkg_resources
.
require
(
pyname
)
def
test_setuptools_integrity
():
_check_package
(
'
opencv
'
,
'
cv2
'
)
# test if opencv installation is sane
test_opencv
()
test_setuptools_integrity
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment