blob: 2c85d157e8009de07c874301f4f844ab4c5ba3f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From: =?utf-8?q?Picca_Fr=C3=83=C2=A9d=C3=83=C2=A9ric-Emmanuel?=
<picca@synchrotron-soleil.fr>
Date: Fri, 11 Aug 2017 16:02:12 +0200
Subject: fix the sift removal
---
silx/opencl/setup.py | 5 ++++-
silx/opencl/test/__init__.py | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/silx/opencl/setup.py b/silx/opencl/setup.py
index d0181cd..bc23c2b 100644
--- a/silx/opencl/setup.py
+++ b/silx/opencl/setup.py
@@ -29,12 +29,15 @@ __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__authors__ = ["J. Kieffer"]
__date__ = "08/09/2016"
+import os
+
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='', top_path=None):
config = Configuration('opencl', parent_package, top_path)
- config.add_subpackage('sift')
+ if os.path.exists('sift'):
+ config.add_subpackage('sift')
config.add_subpackage('test')
return config
diff --git a/silx/opencl/test/__init__.py b/silx/opencl/test/__init__.py
index 24aa06e..bdc83a9 100644
--- a/silx/opencl/test/__init__.py
+++ b/silx/opencl/test/__init__.py
@@ -29,13 +29,16 @@ __date__ = "15/03/2017"
import unittest
from . import test_addition
from . import test_medfilt
-from ..sift import test as test_sift
def suite():
test_suite = unittest.TestSuite()
test_suite.addTests(test_addition.suite())
test_suite.addTests(test_medfilt.suite())
- test_suite.addTests(test_sift.suite())
+ try:
+ from ..sift import test as test_sift
+ test_suite.addTests(test_sift.suite())
+ except ImportError:
+ pass
return test_suite
|