From 7cfcd97287700c37cf352ce5c62f24069957887a Mon Sep 17 00:00:00 2001 From: Alistair McLean <al.mclean@gmail.com> Date: Sun, 5 Jun 2011 12:13:34 +0100 Subject: [PATCH] Changed getuid to be windows compatible, user getpass instead --- pyopencl/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyopencl/cache.py b/pyopencl/cache.py index 51812eef..0a9572e0 100644 --- a/pyopencl/cache.py +++ b/pyopencl/cache.py @@ -292,8 +292,9 @@ def _create_built_program_from_source_cached(ctx, src, options, devices, cache_d if cache_dir is None: from os.path import join from tempfile import gettempdir + import getpass cache_dir = join(gettempdir(), - "pyopencl-compiler-cache-v1-uid%s" % os.getuid()) + "pyopencl-compiler-cache-v1-uid%s" % getpass.getuser()) # {{{ ensure cache directory exists -- GitLab