Merge pull request #1761 from kif/depend_silx_1.1

Make silx 1.1 a dependency
This commit is contained in:
Jerome Kieffer 2022-11-14 17:55:25 +01:00 committed by GitHub
commit abb1ae6307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 26 deletions

View File

@ -36,7 +36,7 @@ __author__ = "Jerome Kieffer"
__contact__ = "Jerome.Kieffer@ESRF.eu"
__license__ = "MIT"
__copyright__ = "2012-2017 European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "06/10/2022"
__date__ = "14/11/2022"
__status__ = "stable"
import os
@ -54,6 +54,7 @@ elif os.environ.get("PYFAI_OPENCL") in ["0", "False"]:
logger.info("Use of OpenCL has been disables from environment variable: PYFAI_OPENCL=0")
pyopencl = None
ocl = None
OpenclProcessing = None
else:
from silx.opencl.common import *
from .. import resources
@ -62,6 +63,7 @@ else:
from silx.opencl import utils
from silx.opencl.utils import get_opencl_code, concatenate_cl_kernel, read_cl_file
from silx.opencl import processing
OpenclProcessing = processing.OpenclProcessing
def get_x87_volatile_option(ctx):
@ -70,22 +72,4 @@ def get_x87_volatile_option(ctx):
ctx.devices[0].platform.name == 'Portable Computing Language'):
return "-DX87_VOLATILE=volatile"
else:
return ""
# Patch needed until silx v1.1 is actually available
if "profile_multi" in dir(processing.OpenclProcessing):
OpenclProcessing = processing.OpenclProcessing
else:
class OpenclProcessing(processing.OpenclProcessing):
def profile_multi(self, event_lists):
"""
addapter wich does not solve the issue of memory leak
:param event_lists: list of ("desc", pyopencl.NanyEvent).
"""
if self.profile:
self.events += event_lists
return ""

View File

@ -1,11 +1,11 @@
[build-system]
requires = [
"wheel",
"setuptools<60.0.0",
"setuptools<60",
"oldest-supported-numpy",
"scipy",
"sphinx",
"nbsphinx",
"silx>=0.10",
"silx>=1.1",
"Cython>=0.25"
]

View File

@ -6,7 +6,7 @@ scipy
matplotlib
numexpr
h5py
silx #>=1.1
silx >=1.1
PyOpenGL
PyQt5
hdf5plugin

View File

@ -25,7 +25,7 @@
# ###########################################################################*/
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "06/01/2022"
__date__ = "14/11/2022"
__status__ = "stable"
import io
@ -987,8 +987,8 @@ def get_project_configuration(dry_run):
"scipy",
"numexpr",
# for the use of pkg_resources on script launcher
"setuptools< 60.0.0",
"silx>=0.15.2"]
"setuptools<60.0.0",
"silx>=1.1"]
setup_requires = [
"setuptools< 60.0.0",