diff options
author | Paul Moore <p.f.moore@gmail.com> | 2014-03-29 13:25:05 +0000 |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2014-03-29 13:25:05 +0000 |
commit | ad636bb797ea09486b6b10e7ac06000c66bfa5c5 (patch) | |
tree | 9d3d29afa97aaeda304074a8b3f9b93ffad1733d | |
parent | 12a19453932428fe1a52e66f15c45ce70d8cf360 (diff) | |
download | wheel-ad636bb797ea09486b6b10e7ac06000c66bfa5c5.tar.gz |
Remove --skip-scripts from bdist_wheel - make skipping scripts the default
-rw-r--r-- | wheel/bdist_wheel.py | 13 | ||||
-rw-r--r-- | wheel/test/test_basic.py | 11 |
2 files changed, 16 insertions, 8 deletions
diff --git a/wheel/bdist_wheel.py b/wheel/bdist_wheel.py index 9c57f3e..37ebfae 100644 --- a/wheel/bdist_wheel.py +++ b/wheel/bdist_wheel.py @@ -71,9 +71,6 @@ class bdist_wheel(Command): ('group=', 'g', "Group name used when creating a tar file" " [default: current group]"), - ('skip-scripts', None, - "skip building the setuptools console_scripts", - "(default: false)"), ('universal', None, "make a universal wheel" " (default: false)"), @@ -98,7 +95,6 @@ class bdist_wheel(Command): self.relative = False self.owner = None self.group = None - self.skip_scripts = False self.universal = False self.python_tag = 'py' + get_impl_ver()[0] @@ -185,10 +181,11 @@ class bdist_wheel(Command): install.skip_build = self.skip_build install.warn_dir = False - if self.skip_scripts: - # A wheel without setuptools scripts is more cross-platform. - install_scripts = self.reinitialize_command('install_scripts') - install_scripts.no_ep = True + # A wheel without setuptools scripts is more cross-platform. + # Use the (undocumented) `no_ep` option to setuptools' + # install_scripts command to avoid creating entry point scripts. + install_scripts = self.reinitialize_command('install_scripts') + install_scripts.no_ep = True # Use a custom scheme for the archive, because we have to decide # at installation time which scheme to use. diff --git a/wheel/test/test_basic.py b/wheel/test/test_basic.py index f1fcc6c..e69fef9 100644 --- a/wheel/test/test_basic.py +++ b/wheel/test/test_basic.py @@ -99,6 +99,17 @@ def test_unpack(): for wheelfile in (w for w in os.listdir(distdir) if w.endswith('.whl')): wheel.tool.unpack(os.path.join(distdir, wheelfile), distdir) +def test_no_scripts(): + """Make sure entry point scripts are not generated.""" + dist = "complex-dist" + basedir = pkg_resources.resource_filename('wheel.test', dist) + for (dirname, subdirs, filenames) in os.walk(basedir): + for filename in filenames: + if filename.endswith('.whl'): + whl = ZipFile(os.path.join(dirname, filename)) + for entry in whl.infolist(): + assert not '.data/scripts/' in entry.filename + def test_pydist(): """Make sure pydist.json exists and validates against our schema.""" # XXX this test may need manual cleanup of older wheels |