Skip to content

Commit

Permalink
Merge 9c1b942 into 35e2762
Browse files Browse the repository at this point in the history
  • Loading branch information
raphiz committed Dec 30, 2014
2 parents 35e2762 + 9c1b942 commit 8170034
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -254,7 +254,7 @@ def build_scripts_string(project):

scripts_dir = project.get_property("dir_dist_scripts")
if scripts_dir:
scripts = map(lambda s: os.path.join(scripts_dir, s), scripts)
scripts = list(map(lambda s: os.path.join(scripts_dir, s), scripts))

return str(scripts)

Expand Down
7 changes: 6 additions & 1 deletion src/unittest/python/plugins/python/distutils_plugin_tests.py
Expand Up @@ -34,6 +34,7 @@
build_package_data_string,
default,
render_manifest_file,
build_scripts_string,
render_setup_script)


Expand Down Expand Up @@ -244,9 +245,13 @@ def test_should_not_remove_hardlink_capabilities_when_workaround_is_disabled(sel

self.assertFalse("import os\ndel os.link\n" in actual_setup_script)

def test_should_render_build_scripts_properly_when_dir_scripts_is_provided(self):
self.project.set_property("dir_dist_scripts", 'scripts')
actual_build_script = build_scripts_string(self.project)
self.assertEquals("['scripts/spam', 'scripts/eggs']", actual_build_script)

def test_should_render_setup_file(self):
actual_setup_script = render_setup_script(self.project)

self.assert_line_by_line_equal("""#!/usr/bin/env python
from distutils.core import setup
Expand Down

0 comments on commit 8170034

Please sign in to comment.