forked from auracaster/bumble_mirror
Make platformdirs import lazy
platformdirs is not available in Android
This commit is contained in:
committed by
David Duarte
parent
d292083ed1
commit
cf7f2e8f44
@@ -23,7 +23,6 @@ import abc
|
|||||||
import logging
|
import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
import platform
|
import platform
|
||||||
import platformdirs
|
|
||||||
from . import rtk
|
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
|
A path to an OS-specific directory for bumble data. The directory is created if
|
||||||
it doesn't exist.
|
it doesn't exist.
|
||||||
"""
|
"""
|
||||||
|
import platformdirs
|
||||||
|
|
||||||
if platform.system() == 'Darwin':
|
if platform.system() == 'Darwin':
|
||||||
# platformdirs doesn't handle macOS right: it doesn't assemble a bundle id
|
# platformdirs doesn't handle macOS right: it doesn't assemble a bundle id
|
||||||
# out of author & project
|
# out of author & project
|
||||||
|
|||||||
Reference in New Issue
Block a user