Commit 4810b6ff authored by Jim Fulton's avatar Jim Fulton

Merge pull request #80 from reinout/empty-eggs-interpreter-fix

Empty "eggs=" interpreter fix. Fixes #79
parents f3347818 08d66abe
......@@ -1168,6 +1168,8 @@ def _pyscript(path, dest, rsetup, initialization=''):
dest += '-script.py'
python = _safe_arg(sys.executable)
if path:
path += ',' # Courtesy comma at the end of the list.
contents = py_script_template % dict(
python = python,
......@@ -1202,7 +1204,7 @@ py_script_template = script_header + '''\
import sys
sys.path[0:0] = [
%(path)s,
%(path)s
]
%(initialization)s
......
......@@ -677,6 +677,20 @@ module:
>>> print_(system(join(bin, 'py')+' -m pdb what'), end='')
Error: what does not exist
An interpreter can also be generated without other eggs:
>>> scripts = zc.buildout.easy_install.scripts(
... [], [], sys.executable, bin, interpreter='py')
>>> cat(bin, 'py') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
#!/usr/local/bin/python2.7
<BLANKLINE>
import sys
<BLANKLINE>
sys.path[0:0] = [
<BLANKLINE>
]
...
An additional argument can be passed to define which scripts to install
and to provide script names. The argument is a dictionary mapping
original script names to new script names.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment