From 0452b339973abf1ba580a203217011340bbf1009 Mon Sep 17 00:00:00 2001 From: Daniel Jewell <23286051+danieldjewell@users.noreply.github.com> Date: Wed, 4 Aug 2021 18:08:50 -0700 Subject: [PATCH] Fix an ImportError w/Blosc on Android Android does not have a functioning semaphore system (actually it's bionic-C that doesn't...). When trying to import numcodecs.blosc on Android, an ImportError exception was thrown - which was unhandled. --- numcodecs/blosc.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/numcodecs/blosc.pyx b/numcodecs/blosc.pyx index 3bfdc00c..340be8a4 100644 --- a/numcodecs/blosc.pyx +++ b/numcodecs/blosc.pyx @@ -79,6 +79,8 @@ try: mutex = multiprocessing.Lock() except OSError: mutex = None +except ImportError: + mutex = None # store ID of process that first loads the module, so we can detect a fork later _importer_pid = os.getpid()