✨ feat(api): add site_bin_dir property#443
Merged
gaborbernat merged 2 commits intotox-dev:mainfrom Feb 14, 2026
Merged
Conversation
Applications that install system-wide executables need a standard location that mirrors user_bin_dir. Currently, user_bin_dir provides ~/.local/bin (Unix/macOS) or %LOCALAPPDATA%\Programs (Windows), but there's no corresponding site-wide equivalent. This creates API inconsistency since all other directory types (data, config, cache, state, log, runtime) have both user and site variants. Package managers like Chocolatey, pip, and uv need a consistent answer for system-wide binary installation. Add site_bin_dir following platform conventions: - Unix/Linux: /usr/local/bin (per FHS 3.0 for locally-installed software) - macOS: /usr/local/bin (standard Homebrew/user installation location) - Windows: %ProgramData%\bin (consistent with site_data_dir pattern) - Android: alias to user_bin_dir (no system-wide installation concept) Also implement use_site_for_root support on Unix, allowing user_bin_dir to redirect to site_bin_dir when running as root, matching the behavior of other user_* properties. Closes tox-dev#434
Add documentation for the new site_bin_dir property with platform-specific paths and links to official standards (FHS 3.0 for Unix/Linux, Chocolatey for Windows precedent).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applications that install system-wide executables need a standard location that mirrors
user_bin_dir. Currently,user_bin_dirprovides~/.local/binon Unix/macOS and%LOCALAPPDATA%\Programson Windows, but there's no corresponding site-wide equivalent. This creates API inconsistency since all other directory types (data, config, cache, state, log, runtime) have both user and site variants. ✨ Package managers like Chocolatey, pip, and uv need a consistent answer for where to install system-wide binaries.The implementation follows platform conventions researched from official documentation. Unix/Linux uses
/usr/local/binper FHS 3.0, which designates this path for locally-installed software distinct from distribution packages in/usr/bin. macOS uses/usr/local/binas the standard Homebrew and user installation location, since/usr/binis read-only on modern macOS per Apple's documentation. Windows uses%ProgramData%\binto mirror thesite_data_dirpattern, following Chocolatey's precedent of using%ProgramData%\Chocolatey\binfor system-wide package binaries. Android aliases touser_bin_dirsince the platform has no system-wide installation concept per Android's storage documentation. 🔍The change also implements
use_site_for_rootsupport on Unix, allowinguser_bin_dirto redirect tosite_bin_dirwhen running as root. This matches the behavior of otheruser_*properties and provides a consistent experience for tools that need to install binaries differently based on privilege level.Closes #434