Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update __init__.py #71

Closed
wants to merge 6 commits into from
Closed

Update __init__.py #71

wants to merge 6 commits into from

Conversation

Blocked
Copy link
Contributor

@Blocked Blocked commented Mar 1, 2022

Treat prefixed unix shells on android apps(Termux/Pydroid) as unix
Fixes #70

Treat unix shells on android apps(Termux/Pydroid) as unix
@YariKartoshe4ka
Copy link
Contributor

YariKartoshe4ka commented Mar 1, 2022

I think I need something more complicated, because it:

-- platformdirs 2.5.2.dev1+gccb98e8 --
-- app dirs (with optional 'version')
user_data_dir: /data/data/com.termux/files/home/.local/share/MyApp/1.0
user_config_dir: /data/data/com.termux/files/home/.config/MyApp/1.0
user_cache_dir: /data/data/com.termux/files/home/.cache/MyApp/1.0
user_state_dir: /data/data/com.termux/files/home/.local/state/MyApp/1.0
user_log_dir: /data/data/com.termux/files/home/.cache/MyApp/1.0/log
user_documents_dir: /data/data/com.termux/files/home/Documents
user_runtime_dir: /run/user/10298/MyApp/1.0
site_data_dir: /usr/local/share/MyApp/1.0
site_config_dir: /etc/xdg/MyApp/1.0

is not same as:

-- platformdirs 2.4.2.dev4+gbd70a11 --
-- app dirs (with optional 'version')
user_data_dir: /data/data/com.termux/files/home/.local/share/MyApp/1.0
user_config_dir: /data/data/com.termux/files/home/.config/MyApp/1.0
user_cache_dir: /data/data/com.termux/files/home/.cache/MyApp/1.0
user_state_dir: /data/data/com.termux/files/home/.local/state/MyApp/1.0
user_log_dir: /data/data/com.termux/files/home/.cache/MyApp/1.0/log
user_documents_dir: /data/data/com.termux/files/home/storage/Documents
user_runtime_dir: /data/data/com.termux/files/usr/var/run/MyApp/1.0/tmp
site_data_dir: /data/data/com.termux/files/usr/share/MyApp/1.0
site_config_dir: /data/data/com.termux/files/usr/etc/MyApp/1.0

@YariKartoshe4ka
Copy link
Contributor

YariKartoshe4ka commented Mar 1, 2022

Sorry, typo! Mean user_runtime, site_data and site_config invalid

Change PREFIX to SHELL environmental variable.
@Blocked Blocked closed this Mar 1, 2022
@Blocked Blocked reopened this Mar 1, 2022
@Blocked Blocked closed this Mar 2, 2022
@Blocked Blocked deleted the termuxXDG branch March 2, 2022 01:59
@gaborbernat
Copy link
Contributor

@Blocked so what was the conclusion here?

@YariKartoshe4ka
Copy link
Contributor

It seems to me that everything is much more complicated and Android requires reconsideration. At least I would like to divide everything into three groups, depending on the current environment:

1. Subsystems

It is no different from regular desktop systems, but runs on android, so it can be safely redirected to already implemented systems.
In practice it occurs as ArchLinux Termux subsystem, Kali Nethunter KeX and other

Already implemented

2. Half-Unix

Applications that mainly use the Unix environment, but are closely related to Android directories.
In practice it occurs as Termux, Pydroid 3 and other

Requires implementation

3. Full-Android

Applications that do not don't the Unix environment in any way, but only Android.
In practice it occurs as QPython, Apps built with P4A, Apps built with BeeWare and other

Already implemented


I think it requires refactoring in android.py. It also needs to be documented.
If you don't mind, I'll implement it and open PR when I'm done 👍

@Blocked
Copy link
Contributor Author

Blocked commented Mar 2, 2022

@gaborbernat I think my linked set up is perfect to catch all scenarios. But I'm unfamiliar with tox tests. So, it is failing tests. I tried to fix it, but it's taking time.

@Blocked Blocked restored the termuxXDG branch March 2, 2022 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support XDG env variables on Android or use default XDG directories on Android/Termux
3 participants