cpython: 449c9fc2fc2d (original) (raw)
Mercurial > cpython
changeset 75438:449c9fc2fc2d
Make packaging’ upload command work with bdist_msi products (#13719) [#13719]
Éric Araujo merwok@netwok.org | |
---|---|
date | Mon, 05 Mar 2012 17:04:07 +0100 |
parents | e12a65da2358 |
children | f282d9041ac7 |
files | Lib/packaging/command/bdist_msi.py Lib/packaging/tests/test_command_bdist_msi.py Misc/NEWS |
diffstat | 3 files changed, 14 insertions(+), 4 deletions(-)[+] [-] Lib/packaging/command/bdist_msi.py 2 Lib/packaging/tests/test_command_bdist_msi.py 13 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Lib/packaging/command/bdist_msi.py +++ b/Lib/packaging/command/bdist_msi.py @@ -261,7 +261,7 @@ class bdist_msi(Command): self.db.Commit() if hasattr(self.distribution, 'dist_files'):
tup = 'bdist_msi', self.target_version or 'any', fullname[](#l1.7)
tup = 'bdist_msi', self.target_version or 'any', installer_name[](#l1.8) self.distribution.dist_files.append(tup)[](#l1.9)
--- a/Lib/packaging/tests/test_command_bdist_msi.py +++ b/Lib/packaging/tests/test_command_bdist_msi.py @@ -1,20 +1,29 @@ """Tests for distutils.command.bdist_msi.""" +import os import sys from packaging.tests import unittest, support +@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows') class BDistMSITestCase(support.TempdirManager, support.LoggingCatcher, unittest.TestCase):
- @unittest.skipUnless(sys.platform == "win32", "runs only on win32") def test_minimal(self): # minimal test XXX need more tests from packaging.command.bdist_msi import bdist_msi
pkg_pth, dist = self.create_dist()[](#l2.20)
project_dir, dist = self.create_dist()[](#l2.21) cmd = bdist_msi(dist)[](#l2.22) cmd.ensure_finalized()[](#l2.23)
cmd.run()[](#l2.24)
bdists = os.listdir(os.path.join(project_dir, 'dist'))[](#l2.26)
self.assertEqual(bdists, ['foo-0.1.msi'])[](#l2.27)
# bug #13719: upload ignores bdist_msi files[](#l2.29)
self.assertEqual(dist.dist_files,[](#l2.30)
[('bdist_msi', 'any', 'dist/foo-0.1.msi')])[](#l2.31)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,7 +13,8 @@ Core and Builtins Library ------- -- Issue #13719: Make the distutils upload command aware of bdist_msi products. +- Issue #13719: Make the distutils and packaging upload commands aware of