r2x_python/utils.rs
1//! Utility constants and functions for platform-specific Python venv path handling
2//!
3//! This module provides compile-time constants for directories and files that differ
4//! between Windows and Unix-like systems in Python virtual environments.
5
6/// The name of the library directory in a Python venv (e.g., "Lib" on Windows, "lib" on Unix)
7#[cfg(windows)]
8pub const PYTHON_LIB_DIR: &str = "Lib";
9#[cfg(not(windows))]
10pub const PYTHON_LIB_DIR: &str = "lib";
11
12/// The name of the binaries/scripts directory in a Python venv (e.g., "Scripts" on Windows, "bin" on Unix)
13#[cfg(windows)]
14pub const PYTHON_BIN_DIR: &str = "Scripts";
15#[cfg(not(windows))]
16pub const PYTHON_BIN_DIR: &str = "bin";
17
18/// The name of the Python executable in a venv (e.g., "python.exe" on Windows, "python" on Unix)
19#[cfg(windows)]
20pub const PYTHON_EXE: &str = "python.exe";
21#[cfg(not(windows))]
22pub const PYTHON_EXE: &str = "python";
23
24/// The subdirectory name for site-packages within the lib directory
25pub const SITE_PACKAGES: &str = "site-packages";