Skip to content

Commit

Permalink
Restore Windows compatibility in doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 24, 2023
1 parent e86b22c commit 0786bc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pip_run/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ def _path_insert(previous, value):


def _build_env(target, *, orig=os.environ):
"""
r"""
Prepend target to PYTHONPATH and add $target/bin to PATH.
>>> import pprint
>>> orig = dict(PYTHONPATH='/orig', PATH='/orig')
>>> pprint.pprint(_build_env(pathlib.Path('/tmp/pip-run/target'), orig=orig))
>>> env = _build_env(pathlib.Path('/tmp/pip-run/target'), orig=orig)
>>> print(pprint.pformat(env).replace('\\', '/').replace(';', ':'))
{'PATH': '/tmp/pip-run/target/bin:/orig',
'PYTHONPATH': '/tmp/pip-run/target:/orig'}
"""
Expand Down

0 comments on commit 0786bc8

Please sign in to comment.