Commit e3ea7bdb authored by Jim Fulton's avatar Jim Fulton

Merge branch 'master' of github.com:buildout/buildout

parents d7394304 e1194b1e
recursive-include src/zc *.txt recursive-include src/zc *.txt
recursive-include src/zc *.test
include *.txt include *.txt
include *.rst include *.rst
...@@ -33,7 +33,6 @@ import subprocess ...@@ -33,7 +33,6 @@ import subprocess
import sys import sys
import tempfile import tempfile
import zc.buildout import zc.buildout
import zipimport
_oprp = getattr(os.path, 'realpath', lambda path: path) _oprp = getattr(os.path, 'realpath', lambda path: path)
def realpath(path): def realpath(path):
...@@ -1022,8 +1021,6 @@ base = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) ...@@ -1022,8 +1021,6 @@ base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
""" """
def _script(module_name, attrs, path, dest, arguments, initialization, rsetup): def _script(module_name, attrs, path, dest, arguments, initialization, rsetup):
generated = []
script = dest
if is_win32: if is_win32:
dest += '-script.py' dest += '-script.py'
...@@ -1042,6 +1039,8 @@ def _script(module_name, attrs, path, dest, arguments, initialization, rsetup): ...@@ -1042,6 +1039,8 @@ def _script(module_name, attrs, path, dest, arguments, initialization, rsetup):
def _distutils_script(path, dest, script_content, initialization, rsetup): def _distutils_script(path, dest, script_content, initialization, rsetup):
if is_win32:
dest += '-script.py'
lines = script_content.splitlines(True) lines = script_content.splitlines(True)
if not ('#!' in lines[0]) and ('python' in lines[0]): if not ('#!' in lines[0]) and ('python' in lines[0]):
......
...@@ -912,6 +912,18 @@ Buildout also installs those: ...@@ -912,6 +912,18 @@ Buildout also installs those:
>>> ls(distbin) >>> ls(distbin)
- distutilsscript - distutilsscript
Like for console_scripts, the output is a list of the scripts
generated. Likewise, on windows two files, an ``.exe`` and a script with
``-script.py`` appended, are generated:
>>> import os, sys
>>> if sys.platform == 'win32':
... scripts == [os.path.join(distbin, 'distutilsscript.exe'),
... os.path.join(distbin, 'distutilsscript-script.py')]
... else:
... scripts == [os.path.join(distbin, 'distutilsscript')]
True
It also works for zipped eggs: It also works for zipped eggs:
>>> distdir2 = tmpdir('distutilsscriptdir2') >>> distdir2 = tmpdir('distutilsscriptdir2')
......
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