Skip to content

Add site_bin_dir counterpart for user_bin_dir #434

@PhrozenByte

Description

@PhrozenByte

The user_bin_dir method currently lacks a site_bin_dir counterpart.

Some suggestions:

  • Unix:
    • /usr/bin?
    • Or a /usr/local/bin:/usr/bin multipath? However, it was chosen not to use a multipath for site_log_dir (Add site_state_dir() counterpart for user_state_dir() #214), so platformdirs could choose to only support /usr/bin for consistency.
    • Or maybe even use $PATH for a multipath? However, the same inconsistency issue applies, additionally platformdirs would need to filter $PATH to exclude e.g. $HOME/.local/bin… Thus I don't think that this is really feasible.
  • Android: user_bin_dir alias? As with any other site_*_dir counterpart…
  • Windows:
    • %PROGRAMFILES%\$appauthor\$appname?
    • Or site_data_dir with an opinionated Bin subdirectory? But I'd say that this would be rather unexpected…
    • Or C:\Windows\System32? It's the only path that is in %PATH% by default, but that would be kinda crazy IMHO…
  • Mac OS: /usr/local/bin? AFAIK one can't use /usr/bin on OS X, but I don't have a Mac…

Note that user_bin_dir currently doesn't accept $appauthor, $appname, $version.

If implemented, user_bin_dir should support the use_site_for_root option and redirect calls to site_bin_dir if enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions