From cf7f2e8f44206aa9524a1dcdea87b062c11b3619 Mon Sep 17 00:00:00 2001 From: David Duarte Date: Thu, 7 Sep 2023 23:01:18 +0000 Subject: [PATCH] Make platformdirs import lazy platformdirs is not available in Android --- bumble/drivers/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bumble/drivers/__init__.py b/bumble/drivers/__init__.py index bb63dd7..d8ea06e 100644 --- a/bumble/drivers/__init__.py +++ b/bumble/drivers/__init__.py @@ -23,7 +23,6 @@ import abc import logging import pathlib import platform -import platformdirs from . import rtk @@ -77,6 +76,8 @@ def project_data_dir() -> pathlib.Path: A path to an OS-specific directory for bumble data. The directory is created if it doesn't exist. """ + import platformdirs + if platform.system() == 'Darwin': # platformdirs doesn't handle macOS right: it doesn't assemble a bundle id # out of author & project