File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def run(self):
4848 _CleanCommand .run (self )
4949 dist_dirs = set ()
5050 for cmd_name in self .distribution .commands :
51- if cmd_name == 'sdist' :
51+ if 'dist' in cmd_name :
5252 command = self .distribution .get_command_obj (cmd_name )
5353 command .ensure_finalized ()
5454 if getattr (command , 'dist_dir' , None ):
Original file line number Diff line number Diff line change @@ -96,3 +96,22 @@ def test_that_dist_directory_is_removed_for_sdist(self):
9696 'clean' , '--dist' ,
9797 )
9898 self .assert_path_does_not_exist (dist_dir )
99+
100+ def test_that_dist_directory_is_removed_for_bdist_dumb (self ):
101+ dist_dir = self .create_directory ('dist-dir' )
102+ run_setup (
103+ 'bdist_dumb' , '--dist-dir={0}' .format (dist_dir ),
104+ 'clean' , '--dist' ,
105+ )
106+ self .assert_path_does_not_exist (dist_dir )
107+
108+ def test_that_multiple_dist_directories_with_be_removed (self ):
109+ sdist_dir = self .create_directory ('sdist-dir' )
110+ bdist_dir = self .create_directory ('bdist_dumb' )
111+ run_setup (
112+ 'sdist' , '--dist-dir={0}' .format (sdist_dir ),
113+ 'bdist_dumb' , '--dist-dir={0}' .format (bdist_dir ),
114+ 'clean' , '--dist' ,
115+ )
116+ self .assert_path_does_not_exist (sdist_dir )
117+ self .assert_path_does_not_exist (bdist_dir )
You can’t perform that action at this time.
0 commit comments