From 02dce9c1cbd468d99d8ebcc9fac814f626e81964 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 28 Mar 2016 12:07:19 -0500 Subject: [PATCH] PEP8 spacing fixes --- pyopencl/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 1b7056e5..2156d6bf 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -234,18 +234,21 @@ del _size_t_char def _find_pyopencl_include_path(): from pkg_resources import Requirement, resource_filename, DistributionNotFound try: - # Try to find the resource with pkg_resources (the recommended setuptools approach) + # Try to find the resource with pkg_resources (the recommended + # setuptools approach) return resource_filename(Requirement.parse("pyopencl2"), "pyopencl/cl") except DistributionNotFound: - # If pkg_resources can't find it (e.g. if the module is part of a frozen application), - # try to find the include path in the same directory as this file + # If pkg_resources can't find it (e.g. if the module is part of a + # frozen application), try to find the include path in the same + # directory as this file from os.path import join, abspath, dirname, exists - + include_path = join(abspath(dirname(__file__)), "cl") - # If that doesn't exist, just re-raise the exception caught from resource_filename + # If that doesn't exist, just re-raise the exception caught from + # resource_filename. if not exists(include_path): raise - + return include_path # }}} -- GitLab