]> granicus.if.org Git - python/commitdiff
Issue #27819: Simply default to gztar for sdist formats by default on all platforms.
authorJason R. Coombs <jaraco@jaraco.com>
Sat, 20 Aug 2016 21:31:07 +0000 (17:31 -0400)
committerJason R. Coombs <jaraco@jaraco.com>
Sat, 20 Aug 2016 21:31:07 +0000 (17:31 -0400)
Lib/distutils/command/sdist.py
Misc/NEWS

index 35a06eb09b7ca9fd6b6f28c0f1b1adaed8fed7bc..f1b8d91977b4dff762e0fa9c47f6a4b165b9a058 100644 (file)
@@ -91,9 +91,6 @@ class sdist(Command):
     negative_opt = {'no-defaults': 'use-defaults',
                     'no-prune': 'prune' }
 
-    default_format = {'posix': 'gztar',
-                      'nt': 'zip' }
-
     sub_commands = [('check', checking_metadata)]
 
     def initialize_options(self):
@@ -110,7 +107,7 @@ class sdist(Command):
         self.manifest_only = 0
         self.force_manifest = 0
 
-        self.formats = None
+        self.formats = ['gztar']
         self.keep_temp = 0
         self.dist_dir = None
 
@@ -126,13 +123,6 @@ class sdist(Command):
             self.template = "MANIFEST.in"
 
         self.ensure_string_list('formats')
-        if self.formats is None:
-            try:
-                self.formats = [self.default_format[os.name]]
-            except KeyError:
-                raise DistutilsPlatformError(
-                      "don't know how to create source distributions "
-                      "on platform %s" % os.name)
 
         bad_format = archive_util.check_archive_formats(self.formats)
         if bad_format:
index 7429608dc99c1de8157b4c9c50bf65609554733e..5da7f8a308e61b1272dde958bec9d5f94930ba2a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #27819: In distutils sdists, simply produce the "gztar" (gzipped tar
+  format) distributions on all platforms unless "formats" is supplied.
+
 - Issue #2466: posixpath.ismount now correctly recognizes mount points which
   the user does not have permission to access.