Commit graph

20 commits

Author SHA1 Message Date
Richard Levasseur
93263d4314
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (#135831)
This is still formally undefined behaviour, but we may as well
keep the *same* undefined behaviour as previous versions.

PEP 796 proposes a cleaner and more consistent replacement for 3.15+
2025-07-04 23:44:37 +10:00
Petr Viktorin
31c82c28f9
GH-128469: Revert "warn when libpython was loaded from outside the build directory (#128645)" (#129506) 2025-01-31 11:17:37 +00:00
Filipe Laíns 🇵🇸
29b3ce8355
GH-128469: warn when libpython was loaded from outside the build directory (#128645)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-29 22:35:55 +00:00
Filipe Laíns 🇵🇸
b74c8f58e8
GH-126985: Don't override venv detection with PYTHONHOME (#127968) 2024-12-15 21:12:13 +00:00
Filipe Laíns 🇵🇸
2b0e2b2893
GH-126985: move pyvenv.cfg detection from site to getpath (#126987) 2024-11-26 13:46:33 +00:00
algonell
9017b95ff2
Fix typos (#123775) 2024-09-09 14:58:26 +02:00
Sam Gross
e8c91d90ba
gh-121103: Put free-threaded libraries in lib/python3.14t (#121293)
On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
2024-07-11 16:21:37 -04:00
Yilei Yang
834b7c18d7
gh-106718: Treat PyConfig.stdlib_dir as highest-priority setting for stdlib_dir when calculating paths (GH-108730) 2023-11-01 21:11:18 +00:00
Steve Dower
df10571a13
gh-100320: Fix path calculations on Windows when python.exe is moved outside of the normal location (GH-100947) 2023-01-16 16:05:39 +00:00
Kai Zhang
e3d4fed074
gh-99370: Calculate zip path from prefix when in a venv (GH-99371)
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.
2022-11-14 15:05:14 +00:00
Vincent Fazio
c41b13d39c
gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)
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>
2022-11-10 16:26:42 +00:00
Steve Dower
3d889dc0a0
gh-98790: When DLLs directory is missing on Windows, assume executable_dir contains PYD files instead (GH-98936) 2022-11-02 18:38:40 +00:00
Victor Stinner
3ceb4b8d3a
gh-84623: Remove unused imports in tests (#93772) 2022-06-13 16:56:03 +02:00
Ronald Oussoren
6aaf4cd866
bpo-46890: Fix setting of sys._base_executable with framework builds on 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.
2022-04-05 02:05:36 -04:00
Steve Dower
7407fe4c25
bpo-46028: Calculate base_executable by resolving symlinks in a venv (GH-30144) 2022-01-18 15:46:26 +00:00
Daniel
c9dc1f491e
bpo-46297: Fix interpreter crash on startup with multiple PythonPaths set in registry (GH-30466) 2022-01-07 22:26:00 +00:00
AN Long
f62420c3d3
Remove spaces in empty lines (GH-30121) 2021-12-16 01:35:21 +09:00
Steve Dower
7778116c2f
bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)
Also ensures that pybuilddir.txt is written early enough in the build to be picked up by later steps.
2021-12-08 19:25:58 +00:00
Steve Dower
b7ef27bc08
bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948) 2021-12-07 00:07:35 +00:00
Steve Dower
99fcf15052
bpo-45582: Port getpath[p].c to Python (GH-29041)
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.
2021-12-03 00:08:42 +00:00