Commits

Paul Moore committed c29f82b

Remove --skip-scripts from bdist_wheel - make skipping scripts the default

  • Participants
  • Parent commits 88ecc79

Comments (0)

Files changed (2)

wheel/bdist_wheel.py

                     ('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)"),
         self.relative = False
         self.owner = None
         self.group = None
-        self.skip_scripts = False
         self.universal = False
         self.python_tag = 'py' + get_impl_ver()[0]
 
         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.

wheel/test/test_basic.py

         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