File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ def run(self):
261261 self .db .Commit ()
262262
263263 if hasattr (self .distribution , 'dist_files' ):
264- tup = 'bdist_msi' , self .target_version or 'any' , fullname
264+ tup = 'bdist_msi' , self .target_version or 'any' , installer_name
265265 self .distribution .dist_files .append (tup )
266266
267267 if not self .keep_temp :
Original file line number Diff line number Diff line change 11"""Tests for distutils.command.bdist_msi."""
2+ import os
23import sys
34
45from packaging .tests import unittest , support
56
67
8+ @unittest .skipUnless (sys .platform == 'win32' , 'these tests require Windows' )
79class BDistMSITestCase (support .TempdirManager ,
810 support .LoggingCatcher ,
911 unittest .TestCase ):
1012
11- @unittest .skipUnless (sys .platform == "win32" , "runs only on win32" )
1213 def test_minimal (self ):
1314 # minimal test XXX need more tests
1415 from packaging .command .bdist_msi import bdist_msi
15- pkg_pth , dist = self .create_dist ()
16+ project_dir , dist = self .create_dist ()
1617 cmd = bdist_msi (dist )
1718 cmd .ensure_finalized ()
19+ cmd .run ()
20+
21+ bdists = os .listdir (os .path .join (project_dir , 'dist' ))
22+ self .assertEqual (bdists , ['foo-0.1.msi' ])
23+
24+ # bug #13719: upload ignores bdist_msi files
25+ self .assertEqual (dist .dist_files ,
26+ [('bdist_msi' , 'any' , 'dist/foo-0.1.msi' )])
1827
1928
2029def test_suite ():
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ Core and Builtins
1313Library
1414-------
1515
16- - Issue #13719: Make the distutils upload command aware of bdist_msi products.
16+ - Issue #13719: Make the distutils and packaging upload commands aware of
17+ bdist_msi products.
1718
1819- Issue #14007: Accept incomplete TreeBuilder objects (missing start, end,
1920 data or close method) for the Python implementation as well.
You can’t perform that action at this time.
0 commit comments