summaryrefslogtreecommitdiffstats
path: root/Modules/getpath.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-117786: Fix venv created from Windows Store install by restoring ↵Steve Dower2024-04-241-10/+14
| | | | __PYVENV_LAUNCHER__ smuggling (GH-117814)
* gh-106718: Treat PyConfig.stdlib_dir as highest-priority setting for ↵Yilei Yang2023-11-011-10/+14
| | | | stdlib_dir when calculating paths (GH-108730)
* no-issue: Remove unused variable in getpath.py (gh-111372)Satish Pokala2023-10-271-2/+0
|
* gh-101543: Ensure Windows registry path is only used when stdlib can't be ↵Steve Dower2023-02-061-19/+12
| | | | found (GH-101544)
* gh-100320: Fix path calculations on Windows when python.exe is moved outside ↵Steve Dower2023-01-161-18/+30
| | | | of the normal location (GH-100947)
* gh-99370: Calculate zip path from prefix when in a venv (GH-99371)Kai Zhang2022-11-141-2/+1
| | | | | | | | Before python3.11, when in a venv the zip path is calculated from prefix on POSIX platforms. In python3.11 the behavior is accidentally changed to calculating from default prefix. This change will break venv created from a non-installed python with a stdlib zip file. This commit restores the behavior back to before python3.11.
* gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)Vincent Fazio2022-11-101-0/+19
| | | | | | | | | | | Check to see if `base_executable` exists. If it does not, attempt to use known alternative names of the python binary to find an executable in the path specified by `home`. If no alternative is found, previous behavior is preserved. Signed-off-by: Vincent Fazio <vfazio@gmail.com> Signed-off-by: Vincent Fazio <vfazio@gmail.com>
* gh-98790: When DLLs directory is missing on Windows, assume executable_dir ↵Steve Dower2022-11-021-7/+21
| | | | contains PYD files instead (GH-98936)
* gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)Christian Heimes2022-08-161-3/+3
| | | | | | - On WASI `ENOTCAPABLE` is now mapped to `PermissionError`. - The `errno` modules exposes the new error number. - `getpath.py` now ignores `PermissionError` when it cannot open landmark files `pybuilddir.txt` and `pyenv.cfg`.
* docs: Fix a few typos (#94899)Tim Gates2022-08-081-1/+1
| | | | | | - overriden => overridden - calcualation => calculation Signed-off-by: Tim Gates <tim.gates@iress.com>
* gh-91985: Ensure in-tree builds override platstdlib_dir in every path ↵neonene2022-06-161-1/+2
| | | | calculation (GH-93641)
* gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields ↵Steve Dower2022-05-191-2/+3
| | | | (GH-92980)
* gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)Victor Stinner2022-05-051-0/+1
| | | | | | | | | | | | Add the -P command line option and the PYTHONSAFEPATH environment variable to not prepend a potentially unsafe path to sys.path. * Add sys.flags.safe_path flag. * Add PyConfig.safe_path member. * Programs/_bootstrap_python.c uses config.safe_path=0. * Update subprocess._optim_args_from_interpreter_flags() to handle the -P command line option. * Modules/getpath.py sets safe_path to 1 if a "._pth" file is present.
* bpo-46890: Fix setting of sys._base_executable with framework builds on ↵Ronald Oussoren2022-04-051-2/+13
| | | | | | | | | macOS (GH-31958) The side effect of this bug was that venv environments directly used the main interpreter instead of the intermediate stub executable, which can cause problems when a script uses system APIs that require the use of an application bundle.
* bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699)Christian Heimes2022-03-061-1/+1
|
* bpo-46028: Calculate base_executable by resolving symlinks in a venv (GH-30144)Steve Dower2022-01-181-1/+12
|
* bpo-46297: Fix interpreter crash on startup with multiple PythonPaths set in ↵Daniel2022-01-071-12/+5
| | | | registry (GH-30466)
* bpo-46049: Fixes ._pth support on non-Windows (GH-30051)Steve Dower2021-12-111-18/+16
|
* bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)neonene2021-12-101-1/+1
| | | This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.
* bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)Steve Dower2021-12-081-8/+11
| | | Also ensures that pybuilddir.txt is written early enough in the build to be picked up by later steps.
* bpo-45582: Write empty pybuilddir.txt on Windows to allow relocatable build ↵Steve Dower2021-12-081-0/+4
| | | | directories (GH-29979)
* bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948)Steve Dower2021-12-071-0/+2
|
* bpo-45582: Port getpath[p].c to Python (GH-29041)Steve Dower2021-12-031-0/+727
The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.