Set the executable bit on files generated by distlib's ScriptMaker

This commit is contained in:
Donald Stufft 2013-11-02 12:03:29 -04:00
parent 780e9d4ccc
commit 6dca500f69
2 changed files with 8 additions and 0 deletions

View File

@ -219,6 +219,11 @@ def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None):
maker = ScriptMaker(None, scheme['scripts'])
maker.variants = set(('', ))
# This is required because otherwise distlib creates scripts that are not
# executable.
# See https://bitbucket.org/pypa/distlib/issue/32/
maker.set_mode = True
# Special case pip and setuptools to generate versioned wrappers
#
# The issue is that some projects (specifically, pip and setuptools) use

View File

@ -117,6 +117,9 @@ def test_install_from_wheel_gen_entrypoint(script, data):
wrapper_file = script.bin / 't1'
assert wrapper_file in result.files_created
if os.name != "nt":
assert bool(os.access(script.base_path / wrapper_file, os.X_OK))
def test_install_from_wheel_with_legacy(script, data):
"""
Test installing scripts (legacy scripts are preserved)