示例#1
0
    def finalize_options(self):
        if self.manifest is None:
            self.manifest = "MANIFEST"
        if self.template is None:
            self.template = "MANIFEST.in"

        self.ensure_string_list("formats")

        bad_format = archive_util.check_archive_formats(self.formats)
        if bad_format:
            raise DistutilsOptionError("unknown archive format '%s'" % bad_format)

        if self.dist_dir is None:
            self.dist_dir = "dist"
示例#2
0
    def finalize_options(self):
        if self.manifest is None:
            self.manifest = 'MANIFEST'
        if self.template is None:
            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:
            raise DistutilsOptionError, "unknown archive format '%s'" % bad_format
        if self.dist_dir is None:
            self.dist_dir = 'dist'
        return
示例#3
0
    def finalize_options(self):
        if self.manifest is None:
            self.manifest = "MANIFEST"
        if self.template is None:
            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:
            raise DistutilsOptionError("unknown archive format '%s'" % bad_format)

        if self.dist_dir is None:
            self.dist_dir = "dist"
 def test_check_archive_formats(self):
     self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']),
                      'xxx')
     self.assertEqual(check_archive_formats(['gztar', 'zip']), None)
 def test_check_archive_formats(self):
     self.assertEqual(check_archive_formats(["gztar", "xxx", "zip"]), "xxx")
     self.assertEqual(check_archive_formats(["gztar", "zip"]), None)
示例#6
0
文件: sdist.py 项目: mcyril/ravel-ftn
"""distutils.command.sdist
示例#7
0
 def test_check_archive_formats(self):
     self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), 'xxx')
     self.assertIsNone(
         check_archive_formats(
             ['gztar', 'bztar', 'xztar', 'ztar', 'tar', 'zip']))
示例#8
0
 def test_check_archive_formats(self):
     self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), 'xxx')
     self.assertEqual(check_archive_formats(['gztar', 'zip']), None)
     return