@anaconda/desktop-bridge-payload-win32-arm64 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +17 -17
- package/manifest.json +7 -7
- package/package.json +1 -1
- package/python/BUILD +1 -1
- package/python/DLLs/_asyncio.pyd +0 -0
- package/python/DLLs/_bz2.pyd +0 -0
- package/python/DLLs/_ctypes.pyd +0 -0
- package/python/DLLs/_ctypes_test.pyd +0 -0
- package/python/DLLs/_decimal.pyd +0 -0
- package/python/DLLs/_elementtree.pyd +0 -0
- package/python/DLLs/_hashlib.pyd +0 -0
- package/python/DLLs/_lzma.pyd +0 -0
- package/python/DLLs/_msi.pyd +0 -0
- package/python/DLLs/_multiprocessing.pyd +0 -0
- package/python/DLLs/_overlapped.pyd +0 -0
- package/python/DLLs/_queue.pyd +0 -0
- package/python/DLLs/_socket.pyd +0 -0
- package/python/DLLs/_sqlite3.pyd +0 -0
- package/python/DLLs/_ssl.pyd +0 -0
- package/python/DLLs/_testbuffer.pyd +0 -0
- package/python/DLLs/_testcapi.pyd +0 -0
- package/python/DLLs/_testconsole.pyd +0 -0
- package/python/DLLs/_testimportmultiple.pyd +0 -0
- package/python/DLLs/_testinternalcapi.pyd +0 -0
- package/python/DLLs/_testmultiphase.pyd +0 -0
- package/python/DLLs/_uuid.pyd +0 -0
- package/python/DLLs/_zoneinfo.pyd +0 -0
- package/python/DLLs/libcrypto-3-arm64.dll +0 -0
- package/python/DLLs/libffi-8.dll +0 -0
- package/python/DLLs/libssl-3-arm64.dll +0 -0
- package/python/DLLs/pyexpat.pyd +0 -0
- package/python/DLLs/select.pyd +0 -0
- package/python/DLLs/sqlite3.dll +0 -0
- package/python/DLLs/unicodedata.pyd +0 -0
- package/python/DLLs/winsound.pyd +0 -0
- package/python/Lib/site-packages/_ruamel_yaml.cp311-win_arm64.pyd +0 -0
- package/python/Lib/site-packages/anaconda_anon_usage-0.8.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/anaconda_auth-0.15.3.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/anaconda_cli_base-0.9.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/anaconda_desktop_bridge/__main__.py +8 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/__main__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/errors.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/__pycache__/telemetry.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__init__.py +2 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/auth_handler.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/auth_plugin.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/lock.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/__pycache__/repo_credentials.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/auth_handler.py +219 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/auth_plugin.py +50 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/lock.py +26 -1
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/__pycache__/channels.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/__pycache__/repodata.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/channels.py +196 -4
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/operations/repodata.py +8 -1
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/repo_credentials.py +224 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/transactions/__pycache__/transaction.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/conda/transactions/transaction.py +23 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/errors.py +24 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/features/__pycache__/conda_tools.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/features/conda_tools.py +8 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/models/__pycache__/conda_tools.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/anaconda_desktop_bridge/models/conda_tools.py +46 -1
- package/python/Lib/site-packages/anaconda_desktop_bridge/telemetry.py +2 -20
- package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/METADATA +75 -5
- package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/RECORD +16 -13
- package/python/Lib/site-packages/anaconda_desktop_bridge-0.1.0.dist-info/uv_cache.json +1 -1
- package/python/Lib/site-packages/archspec-0.2.7.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/cffi-2.1.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/charset_normalizer-3.5.2.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/conda-26.1.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/conda_package_handling-2.6.0.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/distro-1.9.0.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/idna-3.20.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/jsonpatch-1.47.dist-info/RECORD +2 -2
- package/python/Lib/site-packages/keyring-25.7.0.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/markdown_it_py-4.3.0.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/menuinst/platforms/win_utils/winshortcut.cp311-win_arm64.pyd +0 -0
- package/python/Lib/site-packages/menuinst-2.5.1.dist-info/RECORD +2 -2
- package/python/Lib/site-packages/platformdirs/__init__.py +155 -128
- package/python/Lib/site-packages/platformdirs/__main__.py +10 -10
- package/python/Lib/site-packages/platformdirs/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/__main__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/_android.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/_runtime.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/_xdg.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/android.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/api.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/ios.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/macos.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/pytest_plugin.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/testing.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/unix.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/version.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/__pycache__/windows.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/platformdirs/_android.py +67 -0
- package/python/Lib/site-packages/platformdirs/_runtime.py +65 -0
- package/python/Lib/site-packages/platformdirs/_xdg.py +50 -47
- package/python/Lib/site-packages/platformdirs/android.py +64 -112
- package/python/Lib/site-packages/platformdirs/api.py +384 -293
- package/python/Lib/site-packages/platformdirs/ios.py +40 -40
- package/python/Lib/site-packages/platformdirs/macos.py +95 -72
- package/python/Lib/site-packages/platformdirs/pytest_plugin.py +5 -4
- package/python/Lib/site-packages/platformdirs/testing.py +23 -21
- package/python/Lib/site-packages/platformdirs/unix.py +158 -169
- package/python/Lib/site-packages/platformdirs/version.py +2 -2
- package/python/Lib/site-packages/platformdirs/windows.py +135 -121
- package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/METADATA +1 -1
- package/python/Lib/site-packages/platformdirs-4.14.7.dist-info/RECORD +23 -0
- package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → platformdirs-4.14.7.dist-info}/WHEEL +1 -1
- package/python/Lib/site-packages/platformdirs-4.14.7.dist-info/sboms/platformdirs.cdx.json +14820 -0
- package/python/Lib/site-packages/pycosat-0.6.6.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/pycosat.cp311-win_arm64.pyd +0 -0
- package/python/Lib/site-packages/pydantic_settings/__pycache__/version.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/cli.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/nested_secrets.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/pydantic_settings/sources/providers/__pycache__/secrets.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/pydantic_settings/sources/providers/cli.py +13 -16
- package/python/Lib/site-packages/pydantic_settings/sources/providers/nested_secrets.py +32 -18
- package/python/Lib/site-packages/pydantic_settings/sources/providers/secrets.py +20 -1
- package/python/Lib/site-packages/pydantic_settings/version.py +1 -1
- package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/METADATA +1 -1
- package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/RECORD +10 -10
- package/python/Lib/site-packages/pygments-2.21.0.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/python_dotenv-1.2.4.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/ruamel_yaml_clib-0.2.15.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/semver/__about__.py +1 -1
- package/python/Lib/site-packages/semver/__pycache__/__about__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/semver/__pycache__/version.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/semver/version.py +16 -5
- package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/METADATA +1 -1
- package/python/Lib/site-packages/semver-3.1.2.dist-info/RECORD +17 -0
- package/python/Lib/site-packages/sentry_sdk/__pycache__/_types.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/__pycache__/client.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/__pycache__/consts.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/__pycache__/traces.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/__pycache__/utils.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/_types.py +27 -3
- package/python/Lib/site-packages/sentry_sdk/client.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/consts.py +7 -1
- package/python/Lib/site-packages/sentry_sdk/crons/__pycache__/decorator.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/crons/__pycache__/utils.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/crons/decorator.py +2 -0
- package/python/Lib/site-packages/sentry_sdk/crons/utils.py +26 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/arq.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/gql.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/huggingface_hub.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/starlette.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/__pycache__/trytond.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/arq.py +9 -16
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__init__.py +2 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/_client.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/__pycache__/_instrumentation.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_client.py +13 -15
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_instrumentation.py +11 -13
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/base.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/bedrock.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/base.py +16 -7
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/bedrock.py +771 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/celery/__init__.py +3 -2
- package/python/Lib/site-packages/sentry_sdk/integrations/celery/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/django/__init__.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/integrations/django/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/django/__pycache__/signals_handlers.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/django/signals_handlers.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/integrations/gql.py +28 -3
- package/python/Lib/site-packages/sentry_sdk/integrations/huggingface_hub.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/integrations/openai_agents/__init__.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/integrations/openai_agents/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/starlette.py +2 -2
- package/python/Lib/site-packages/sentry_sdk/integrations/trytond.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/profiler/__pycache__/continuous_profiler.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/profiler/__pycache__/transaction_profiler.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/profiler/continuous_profiler.py +0 -3
- package/python/Lib/site-packages/sentry_sdk/profiler/transaction_profiler.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/traces.py +1 -1
- package/python/Lib/site-packages/sentry_sdk/utils.py +17 -4
- package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/METADATA +1 -1
- package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/RECORD +31 -31
- package/python/Lib/site-packages/tqdm-4.70.1.dist-info/RECORD +1 -1
- package/python/Lib/site-packages/typer-0.29.1.dist-info/RECORD +1 -1
- package/python/Lib/venv/scripts/nt/python.exe +0 -0
- package/python/Lib/venv/scripts/nt/pythonw.exe +0 -0
- package/python/Scripts/conda.exe +0 -0
- package/python/libs/_asyncio.lib +0 -0
- package/python/libs/_bz2.lib +0 -0
- package/python/libs/_ctypes.lib +0 -0
- package/python/libs/_ctypes_test.lib +0 -0
- package/python/libs/_decimal.lib +0 -0
- package/python/libs/_elementtree.lib +0 -0
- package/python/libs/_hashlib.lib +0 -0
- package/python/libs/_lzma.lib +0 -0
- package/python/libs/_msi.lib +0 -0
- package/python/libs/_multiprocessing.lib +0 -0
- package/python/libs/_overlapped.lib +0 -0
- package/python/libs/_queue.lib +0 -0
- package/python/libs/_socket.lib +0 -0
- package/python/libs/_sqlite3.lib +0 -0
- package/python/libs/_ssl.lib +0 -0
- package/python/libs/_testbuffer.lib +0 -0
- package/python/libs/_testcapi.lib +0 -0
- package/python/libs/_testconsole.lib +0 -0
- package/python/libs/_testimportmultiple.lib +0 -0
- package/python/libs/_testinternalcapi.lib +0 -0
- package/python/libs/_testmultiphase.lib +0 -0
- package/python/libs/_tkinter.lib +0 -0
- package/python/libs/_uuid.lib +0 -0
- package/python/libs/_zoneinfo.lib +0 -0
- package/python/libs/pyexpat.lib +0 -0
- package/python/libs/python3.lib +0 -0
- package/python/libs/python311.lib +0 -0
- package/python/libs/select.lib +0 -0
- package/python/libs/sqlite3.lib +0 -0
- package/python/libs/unicodedata.lib +0 -0
- package/python/libs/winsound.lib +0 -0
- package/python/python.exe +0 -0
- package/python/python3.dll +0 -0
- package/python/python311.dll +0 -0
- package/python/pythonw.exe +0 -0
- package/python/Lib/site-packages/platformdirs-4.14.5.dist-info/RECORD +0 -20
- package/python/Lib/site-packages/semver-3.1.1.dist-info/RECORD +0 -17
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/__pycache__/registry.cpython-311.pyc +0 -0
- package/python/Lib/site-packages/sentry_sdk/integrations/boto3/_services/registry.py +0 -22
- /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/INSTALLER +0 -0
- /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/REQUESTED +0 -0
- /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/entry_points.txt +0 -0
- /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → platformdirs-4.14.7.dist-info}/licenses/LICENSE +0 -0
- /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/INSTALLER +0 -0
- /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/REQUESTED +0 -0
- /package/python/Lib/site-packages/{platformdirs-4.14.5.dist-info → pydantic_settings-2.16.3.dist-info}/WHEEL +0 -0
- /package/python/Lib/site-packages/{pydantic_settings-2.16.2.dist-info → pydantic_settings-2.16.3.dist-info}/licenses/LICENSE +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/INSTALLER +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/REQUESTED +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/WHEEL +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/entry_points.txt +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/python/Lib/site-packages/{semver-3.1.1.dist-info → semver-3.1.2.dist-info}/top_level.txt +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/INSTALLER +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/REQUESTED +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/WHEEL +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/entry_points.txt +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/licenses/LICENSE +0 -0
- /package/python/Lib/site-packages/{sentry_sdk-2.74.0.dist-info → sentry_sdk-2.75.0.dist-info}/top_level.txt +0 -0
|
@@ -4,15 +4,18 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import re
|
|
7
|
-
import sys
|
|
8
7
|
from contextlib import suppress
|
|
9
|
-
from functools import cache
|
|
10
|
-
from typing import Final
|
|
8
|
+
from functools import cache
|
|
11
9
|
|
|
10
|
+
from ._android import android_folder as _android_folder
|
|
12
11
|
from .api import PlatformDirsABC
|
|
13
12
|
|
|
13
|
+
TYPE_CHECKING = False
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from typing import Final
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods] # full directory API
|
|
16
19
|
"""Platform directories for Android.
|
|
17
20
|
|
|
18
21
|
Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Directories are typically located
|
|
@@ -24,15 +27,20 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
24
27
|
|
|
25
28
|
"""
|
|
26
29
|
|
|
30
|
+
@property
|
|
31
|
+
def site_data_dir(self) -> str:
|
|
32
|
+
"""Data directory shared by users, same as `user_data_dir`."""
|
|
33
|
+
return self.user_data_dir
|
|
34
|
+
|
|
27
35
|
@property
|
|
28
36
|
def user_data_dir(self) -> str:
|
|
29
37
|
"""Data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``."""
|
|
30
38
|
return self._append_app_name_and_version(_require_android_folder(), "files", private=True)
|
|
31
39
|
|
|
32
40
|
@property
|
|
33
|
-
def
|
|
34
|
-
"""
|
|
35
|
-
return self.
|
|
41
|
+
def site_config_dir(self) -> str:
|
|
42
|
+
"""Config directory shared by users, same as `user_config_dir`."""
|
|
43
|
+
return self.user_config_dir
|
|
36
44
|
|
|
37
45
|
@property
|
|
38
46
|
def user_config_dir(self) -> str:
|
|
@@ -40,9 +48,9 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
40
48
|
return self._append_app_name_and_version(_require_android_folder(), "shared_prefs", private=True)
|
|
41
49
|
|
|
42
50
|
@property
|
|
43
|
-
def
|
|
44
|
-
"""
|
|
45
|
-
return self.
|
|
51
|
+
def site_cache_dir(self) -> str:
|
|
52
|
+
"""Cache directory shared by users, same as `user_cache_dir`."""
|
|
53
|
+
return self.user_cache_dir
|
|
46
54
|
|
|
47
55
|
@property
|
|
48
56
|
def user_cache_dir(self) -> str:
|
|
@@ -50,9 +58,9 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
50
58
|
return self._append_app_name_and_version(_require_android_folder(), "cache", private=True)
|
|
51
59
|
|
|
52
60
|
@property
|
|
53
|
-
def
|
|
54
|
-
"""
|
|
55
|
-
return self.
|
|
61
|
+
def site_state_dir(self) -> str:
|
|
62
|
+
"""State directory shared by users, same as `user_state_dir`."""
|
|
63
|
+
return self.user_state_dir
|
|
56
64
|
|
|
57
65
|
@property
|
|
58
66
|
def user_state_dir(self) -> str:
|
|
@@ -60,24 +68,23 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
60
68
|
return self.user_data_dir
|
|
61
69
|
|
|
62
70
|
@property
|
|
63
|
-
def
|
|
64
|
-
"""
|
|
65
|
-
return self.
|
|
71
|
+
def site_log_dir(self) -> str:
|
|
72
|
+
"""Log directory shared by users, same as `user_log_dir`."""
|
|
73
|
+
return self.user_log_dir
|
|
66
74
|
|
|
67
75
|
@property
|
|
68
76
|
def user_log_dir(self) -> str:
|
|
69
|
-
"""Log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it
|
|
77
|
+
"""Log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it.
|
|
78
|
+
|
|
79
|
+
E.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``.
|
|
80
|
+
|
|
81
|
+
"""
|
|
70
82
|
path = self.user_cache_dir
|
|
71
83
|
if self.opinion:
|
|
72
|
-
path = os.path.join(path, "log") # ruff:ignore[os-path-join]
|
|
84
|
+
path = os.path.join(path, "log") # ruff:ignore[os-path-join] # preserve path separators
|
|
73
85
|
self._optionally_create_directory(path, private=True)
|
|
74
86
|
return path
|
|
75
87
|
|
|
76
|
-
@property
|
|
77
|
-
def site_log_dir(self) -> str:
|
|
78
|
-
"""Log directory shared by users, same as `user_log_dir`."""
|
|
79
|
-
return self.user_log_dir
|
|
80
|
-
|
|
81
88
|
@property
|
|
82
89
|
def user_documents_dir(self) -> str:
|
|
83
90
|
"""Documents directory tied to the user e.g. ``/storage/emulated/0/Documents``."""
|
|
@@ -134,15 +141,21 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
134
141
|
"""Preference directory tied to the user, same as ``user_config_dir``."""
|
|
135
142
|
return self.user_config_dir
|
|
136
143
|
|
|
144
|
+
@property
|
|
145
|
+
def site_bin_dir(self) -> str:
|
|
146
|
+
"""Bin directory shared by users, same as `user_bin_dir`."""
|
|
147
|
+
return self.user_bin_dir
|
|
148
|
+
|
|
137
149
|
@property
|
|
138
150
|
def user_bin_dir(self) -> str:
|
|
139
151
|
"""Bin directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/bin``."""
|
|
152
|
+
# preserve path separators
|
|
140
153
|
return os.path.join(_require_android_folder(), "files", "bin") # ruff:ignore[os-path-join]
|
|
141
154
|
|
|
142
155
|
@property
|
|
143
|
-
def
|
|
144
|
-
"""
|
|
145
|
-
return self.
|
|
156
|
+
def site_applications_dir(self) -> str:
|
|
157
|
+
"""Applications directory shared by users, same as `user_applications_dir`."""
|
|
158
|
+
return self.user_applications_dir
|
|
146
159
|
|
|
147
160
|
@property
|
|
148
161
|
def user_applications_dir(self) -> str:
|
|
@@ -150,24 +163,23 @@ class Android(PlatformDirsABC): # ruff:ignore[too-many-public-methods]
|
|
|
150
163
|
return self.user_data_dir
|
|
151
164
|
|
|
152
165
|
@property
|
|
153
|
-
def
|
|
154
|
-
"""
|
|
155
|
-
return self.
|
|
166
|
+
def site_runtime_dir(self) -> str:
|
|
167
|
+
"""Runtime directory shared by users, same as `user_runtime_dir`."""
|
|
168
|
+
return self.user_runtime_dir
|
|
156
169
|
|
|
157
170
|
@property
|
|
158
171
|
def user_runtime_dir(self) -> str:
|
|
159
|
-
"""Runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it
|
|
172
|
+
"""Runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it.
|
|
173
|
+
|
|
174
|
+
E.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``.
|
|
175
|
+
|
|
176
|
+
"""
|
|
160
177
|
path = self.user_cache_dir
|
|
161
178
|
if self.opinion:
|
|
162
|
-
path = os.path.join(path, "tmp") # ruff:ignore[os-path-join]
|
|
179
|
+
path = os.path.join(path, "tmp") # ruff:ignore[os-path-join] # preserve path separators
|
|
163
180
|
self._optionally_create_directory(path, private=True)
|
|
164
181
|
return path
|
|
165
182
|
|
|
166
|
-
@property
|
|
167
|
-
def site_runtime_dir(self) -> str:
|
|
168
|
-
"""Runtime directory shared by users, same as `user_runtime_dir`."""
|
|
169
|
-
return self.user_runtime_dir
|
|
170
|
-
|
|
171
183
|
|
|
172
184
|
def _require_android_folder() -> str:
|
|
173
185
|
if (folder := _android_folder()) is None:
|
|
@@ -176,91 +188,31 @@ def _require_android_folder() -> str:
|
|
|
176
188
|
return folder
|
|
177
189
|
|
|
178
190
|
|
|
179
|
-
@lru_cache(maxsize=1)
|
|
180
|
-
def _android_folder() -> str | None:
|
|
181
|
-
""":returns: base folder for the Android OS or None if it cannot be found"""
|
|
182
|
-
result = _python_for_android_folder()
|
|
183
|
-
if result is None:
|
|
184
|
-
# and if that fails, too, find an android folder looking at path on the sys.path
|
|
185
|
-
# warning: only works for apps installed under /data, not adopted storage etc.
|
|
186
|
-
pattern = re.compile(
|
|
187
|
-
r"""
|
|
188
|
-
(?P<folder>
|
|
189
|
-
/data/(?:data|user/\d+) # internal storage of the primary user or of user N
|
|
190
|
-
/[^/]+ # package name, one path segment
|
|
191
|
-
)
|
|
192
|
-
/files(?=/|\Z) # the files directory the interpreter runs from
|
|
193
|
-
""",
|
|
194
|
-
re.VERBOSE,
|
|
195
|
-
)
|
|
196
|
-
for path in sys.path:
|
|
197
|
-
if match := pattern.match(path):
|
|
198
|
-
result = match["folder"]
|
|
199
|
-
break
|
|
200
|
-
else:
|
|
201
|
-
result = None
|
|
202
|
-
if result is None:
|
|
203
|
-
# one last try: find an android folder looking at path on the sys.path taking adopted storage paths into
|
|
204
|
-
# account
|
|
205
|
-
pattern = re.compile(
|
|
206
|
-
r"""
|
|
207
|
-
(?P<folder>
|
|
208
|
-
/mnt/expand/[a-fA-F0-9-]{36} # adopted storage volume, named by its UUID
|
|
209
|
-
/(?:data|user/\d+) # the primary user or user N
|
|
210
|
-
/[^/]+ # package name, one path segment
|
|
211
|
-
)
|
|
212
|
-
/files(?=/|\Z) # the files directory the interpreter runs from
|
|
213
|
-
""",
|
|
214
|
-
re.VERBOSE,
|
|
215
|
-
)
|
|
216
|
-
for path in sys.path:
|
|
217
|
-
if match := pattern.match(path):
|
|
218
|
-
result = match["folder"]
|
|
219
|
-
break
|
|
220
|
-
else:
|
|
221
|
-
result = None
|
|
222
|
-
return result
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
_USER_ID: Final = re.compile(
|
|
226
|
-
r"""
|
|
227
|
-
/user/ # the per-user data root, under /data or an adopted /mnt/expand volume
|
|
228
|
-
(?P<user>\d+) # the Android user id
|
|
229
|
-
/ # followed by the package folder
|
|
230
|
-
""",
|
|
231
|
-
re.VERBOSE,
|
|
232
|
-
)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
def _shared_storage() -> str:
|
|
236
|
-
# Android mounts each user's shared storage at /storage/emulated/<user id>, and an app sees only its own user's.
|
|
237
|
-
user = match["user"] if (match := _USER_ID.search(_android_folder() or "")) else "0"
|
|
238
|
-
return f"/storage/emulated/{user}"
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
def _python_for_android_folder() -> str | None:
|
|
242
|
-
with suppress(ImportError):
|
|
243
|
-
from jnius import JavaException, autoclass # ruff:ignore[import-outside-top-level] # ty: ignore[unresolved-import]
|
|
244
|
-
|
|
245
|
-
with suppress(JavaException):
|
|
246
|
-
# A python-for-android service runs in its own process, where the activity is null.
|
|
247
|
-
if (context := autoclass("org.kivy.android.PythonActivity").mActivity) is None:
|
|
248
|
-
context = autoclass("org.kivy.android.PythonService").mService
|
|
249
|
-
if context is not None:
|
|
250
|
-
return context.getFilesDir().getParentFile().getAbsolutePath()
|
|
251
|
-
return None
|
|
252
|
-
|
|
253
|
-
|
|
254
191
|
@cache
|
|
255
192
|
def _android_public_folder(name: str) -> str:
|
|
256
193
|
with suppress(ImportError):
|
|
257
|
-
from jnius import JavaException, autoclass # ruff:ignore[import-outside-top-level] # ty: ignore[
|
|
194
|
+
from jnius import JavaException, autoclass # ruff:ignore[import-outside-top-level] # jnius exists only on Android # ty: ignore[import-not-found]
|
|
258
195
|
|
|
259
196
|
with suppress(JavaException):
|
|
260
197
|
return autoclass("android.os.Environment").getExternalStoragePublicDirectory(name).getAbsolutePath()
|
|
261
198
|
return f"{_shared_storage()}/{name}"
|
|
262
199
|
|
|
263
200
|
|
|
201
|
+
def _shared_storage() -> str:
|
|
202
|
+
# Android mounts each user's shared storage at /storage/emulated/<user id>, and an app sees only its own user's.
|
|
203
|
+
return f"/storage/emulated/{(match['user'] if (match := _USER_ID.search(_android_folder() or '')) else '0')}"
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
_USER_ID: Final[re.Pattern[str]] = re.compile(
|
|
207
|
+
r"""
|
|
208
|
+
/user/ # the per-user data root, under /data or an adopted /mnt/expand volume
|
|
209
|
+
(?P<user>\d+) # the Android user id
|
|
210
|
+
/ # followed by the package folder
|
|
211
|
+
""",
|
|
212
|
+
re.VERBOSE,
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
|
|
264
216
|
__all__ = [
|
|
265
217
|
"Android",
|
|
266
218
|
]
|