Skip to content
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ceeaa3b
initial file
rickeylev Jun 27, 2025
d0a9289
add some core content
rickeylev Jun 28, 2025
41d2ea8
rename to motivation
rickeylev Jun 28, 2025
65a415c
note it enables more advanced optimizations
rickeylev Jun 28, 2025
4175b20
add foot notes, relocatable term section, links
rickeylev Jun 29, 2025
bbc85b7
update discussion, sponsor headers to pending
rickeylev Jun 29, 2025
a0c2529
rst fixups
rickeylev Jun 29, 2025
8e6e21e
fixup italics
rickeylev Jun 29, 2025
37202ca
rename to relative-venv
rickeylev Jun 29, 2025
b81c50f
clarify advanced deployment options, reflow some text
rickeylev Jun 30, 2025
55a5e28
add specification, rationale section; doc why env vars arent an option
rickeylev Jun 30, 2025
e09b00d
also mention curdir syntax handling
rickeylev Jun 30, 2025
c7a6a9b
update some todo text
rickeylev Jun 30, 2025
bc1ffbd
update codeowners
rickeylev Jun 30, 2025
2301d2a
add initial discussion footnote link
rickeylev Jun 30, 2025
e14b01f
add fr footnote
rickeylev Jun 30, 2025
175f378
revert codeowners change
rickeylev Jun 30, 2025
31cb756
remove packaging-related specs
rickeylev Jul 2, 2025
cd46f4d
fix lint errors with headers
rickeylev Jul 2, 2025
b532f5c
set sponsor
rickeylev Jul 2, 2025
99434fc
set sponsor as codeowner
rickeylev Jul 2, 2025
862142a
clarify title to focus on core pyvenv.cfg home behavior
rickeylev Jul 2, 2025
1c8fb2d
fix typo; remove host-relocatable mention; remove non-germane copying…
rickeylev Jul 2, 2025
c542890
fix typos, grammar
rickeylev Jul 2, 2025
3240227
Apply suggestions from code review
rickeylev Jul 2, 2025
557cb71
fix up markdown and text width
rickeylev Jul 2, 2025
0579623
fix title underlines
rickeylev Jul 2, 2025
c9388b3
link to relative venv reference implementation
rickeylev Jul 2, 2025
b959f24
Apply suggestions from code review
rickeylev Jul 6, 2025
5b259cc
Apply suggestions from code review
rickeylev Aug 17, 2025
560dadb
Merge branch 'main' of https://github.com/python/peps into relative.v…
rickeylev Aug 17, 2025
f41ed51
Merge branch 'relative.venvs' of https://github.com/rickeylev/peps in…
rickeylev Aug 17, 2025
5cbc9f5
better answer why/how relvenvs help; wrap some long lines
rickeylev Aug 17, 2025
0af0eea
Apply AA-Turner suggestions
rickeylev Aug 21, 2025
68dd5e0
add refs, remove CWD acronym, fix grammar
rickeylev Aug 21, 2025
b50a80c
address review comments: better split and organize rationale/motivation
rickeylev Aug 24, 2025
af8f880
Merge branch 'main' into relative.venvs
AA-Turner Sep 29, 2025
ae5a67f
Apply markup and simple grammar fixes from code review
ncoghlan Oct 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clarify advanced deployment options, reflow some text
  • Loading branch information
rickeylev committed Jun 30, 2025
commit b81c50f001899297f6c8a9413062abe0bb64d3ea
33 changes: 16 additions & 17 deletions peps/pep-0796.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Motivation
There are two main motivations for allowing relative paths in ``pyvenv.cfg``
and thus enabling host-relocatable virtual environments.

First, it is currently proscribed that the ``home`` value in ``pyvenv.cfg`` be an
absolute path. The behavior of relative paths is unspecified.
While techniques exist to work around this for every other
sub-part of a virtual environment, the one remaining part without a teneable
solution is how the Python runtime itself finds ``PYTHONHOME``. This is because,
currently, the startup process requires absolute paths be used for the ``home``
key in ``pyvenv.cfg``. If a relative path is used, behavior is unspecified
(currently, it is relative to the process's current working directory, making
it untenable to use).
First, it is currently proscribed that the ``home`` value in ``pyvenv.cfg`` be
an absolute path. The behavior of relative paths is unspecified. While
techniques exist to work around this for every other sub-part of a virtual
environment, the one remaining part without a teneable solution is how the
Python runtime itself finds ``PYTHONHOME``. This is because, currently, the
startup process requires absolute paths be used for the ``home`` key in
``pyvenv.cfg``. If a relative path is used, behavior is unspecified (currently,
it is relative to the process's current working directory, making it untenable
to use).

This requirement is overly proscriptive and restrictive because, given a known
anchor point, it's easy to tranform a relative path to an absolute path and
Expand All @@ -58,15 +58,14 @@ applications. This means ...
* The simpler the process is to re-create the environment, the faster the process
can be.

By making it trivial to copy a virtual environment from one host to another,
it avoids these categories of problems. Additionally, the development tools
to create a virtual environment and install its dependencies aren't needed
on the host that intends to run the program.
By making it trivial to copy a virtual environment from one host to another, it
avoids these categories of problems. Additionally, the development tools to
create a virtual environment and install its dependencies aren't needed on the
host that intends to run the program.

Simple copying allows additional optimizations in more advanced deployments,
such as remote mounting
Because only simply copying is need, it allows more advanced d
This simple copying enables more advanced deployments to employ
Because the virtual environment doesn't require modifications to be usable, it
also allows more advanced deployment mechansisms, e.g. remote mounting and
caching of artifacts.

Rationale
=========
Expand Down