From 59cd4f60e8a70a4825ece5db0201f3eca1f4260e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 24 Oct 2015 12:51:23 +0200 Subject: [PATCH 1/3] use system compyte Signed-off-by: Igor Gnatenko --- pyopencl/array.py | 2 +- pyopencl/cffi_cl.py | 2 +- pyopencl/reduction.py | 2 +- pyopencl/tools.py | 10 +++++----- setup.py | 12 ------------ 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/pyopencl/array.py b/pyopencl/array.py index 4d5334b..8c2c050 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -34,7 +34,7 @@ import numpy as np import pyopencl.elementwise as elementwise import pyopencl as cl from pytools import memoize_method -from pyopencl.compyte.array import ( +from compyte.array import ( as_strided as _as_strided, f_contiguous_strides as _f_contiguous_strides, c_contiguous_strides as _c_contiguous_strides, diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index c5effc7..f9a2ff8 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -37,7 +37,7 @@ import re from pytools import memoize_method from pyopencl._cffi import ffi as _ffi -from .compyte.array import f_contiguous_strides, c_contiguous_strides +from compyte.array import f_contiguous_strides, c_contiguous_strides from pyopencl._cffi import lib as _lib diff --git a/pyopencl/reduction.py b/pyopencl/reduction.py index 7c01741..acb96d1 100644 --- a/pyopencl/reduction.py +++ b/pyopencl/reduction.py @@ -514,7 +514,7 @@ def _get_dot_expr(dtype_out, dtype_a, dtype_b, conjugate_first, dtype_b = dtype_a if dtype_out is None: - from pyopencl.compyte.array import get_common_dtype + from compyte.array import get_common_dtype dtype_out = get_common_dtype( dtype_a.type(0), dtype_b.type(0), has_double_support) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 6a72ee9..38ae708 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -40,13 +40,13 @@ from pytools.persistent_dict import KeyBuilder as KeyBuilderBase import re -from pyopencl.compyte.dtypes import ( # noqa +from compyte.dtypes import ( # noqa get_or_register_dtype, TypeNameNotKnown, register_dtype, dtype_to_ctype) def _register_types(): - from pyopencl.compyte.dtypes import ( + from compyte.dtypes import ( TYPE_REGISTRY, fill_registry_with_opencl_c_types) fill_registry_with_opencl_c_types(TYPE_REGISTRY) @@ -345,7 +345,7 @@ def parse_c_arg(c_arg, with_offset=False): else: vec_arg_factory = VectorArg - from pyopencl.compyte.dtypes import parse_c_arg_backend + from compyte.dtypes import parse_c_arg_backend return parse_c_arg_backend(c_arg, ScalarArg, vec_arg_factory) @@ -781,7 +781,7 @@ class _TemplateRenderer(object): try: return self.type_aliases[typename] except KeyError: - from pyopencl.compyte.dtypes import NAME_TO_DTYPE + from compyte.dtypes import NAME_TO_DTYPE return NAME_TO_DTYPE[typename] else: return np.dtype(typename) @@ -819,7 +819,7 @@ class _TemplateRenderer(object): else: vec_arg_factory = _VectorArgPlaceholder - from pyopencl.compyte.dtypes import parse_c_arg_backend + from compyte.dtypes import parse_c_arg_backend parsed_args = [] for arg in all_args: if isinstance(arg, str): diff --git a/setup.py b/setup.py index 3a66674..4ca9284 100644 --- a/setup.py +++ b/setup.py @@ -169,18 +169,6 @@ def main(): from aksetup_helper import count_down_delay count_down_delay(delay=5) - if not exists("pyopencl/compyte/dtypes.py"): - print(75 * "-") - print("You are missing important files from the pyopencl distribution.") - print(75 * "-") - print("You may have downloaded a zip or tar file from Github.") - print("Those do not work, and I am unable to prevent Github from showing") - print("them. Delete that file, and get an actual release file from the") - print("Python package index:") - print() - print("https://pypi.python.org/pypi/pyopencl") - sys.exit(1) - # {{{ write cffi build script with open("cffi_build.py.in", "rt") as f: -- 2.15.1