mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Patch #414775: Add --skip-build option to bdist command.
This commit is contained in:
		
							parent
							
								
									cdc4451222
								
							
						
					
					
						commit
						9668b933e3
					
				
					 5 changed files with 21 additions and 3 deletions
				
			
		| 
						 | 
					@ -40,8 +40,12 @@ class bdist (Command):
 | 
				
			||||||
                    ('dist-dir=', 'd',
 | 
					                    ('dist-dir=', 'd',
 | 
				
			||||||
                     "directory to put final built distributions in "
 | 
					                     "directory to put final built distributions in "
 | 
				
			||||||
                     "[default: dist]"),
 | 
					                     "[default: dist]"),
 | 
				
			||||||
 | 
					                    ('skip-build', None,
 | 
				
			||||||
 | 
					                     "skip rebuilding everything (for testing/debugging)"),
 | 
				
			||||||
                   ]
 | 
					                   ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    boolean_options = ['skip-build']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    help_options = [
 | 
					    help_options = [
 | 
				
			||||||
        ('help-formats', None,
 | 
					        ('help-formats', None,
 | 
				
			||||||
         "lists available distribution formats", show_formats),
 | 
					         "lists available distribution formats", show_formats),
 | 
				
			||||||
| 
						 | 
					@ -76,6 +80,7 @@ class bdist (Command):
 | 
				
			||||||
        self.plat_name = None
 | 
					        self.plat_name = None
 | 
				
			||||||
        self.formats = None
 | 
					        self.formats = None
 | 
				
			||||||
        self.dist_dir = None
 | 
					        self.dist_dir = None
 | 
				
			||||||
 | 
					        self.skip_build = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # initialize_options()
 | 
					    # initialize_options()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,9 +30,11 @@ class bdist_dumb (Command):
 | 
				
			||||||
                     "creating the distribution archive"),
 | 
					                     "creating the distribution archive"),
 | 
				
			||||||
                    ('dist-dir=', 'd',
 | 
					                    ('dist-dir=', 'd',
 | 
				
			||||||
                     "directory to put final built distributions in"),
 | 
					                     "directory to put final built distributions in"),
 | 
				
			||||||
 | 
					                    ('skip-build', None,
 | 
				
			||||||
 | 
					                     "skip rebuilding everything (for testing/debugging)"),
 | 
				
			||||||
                   ]
 | 
					                   ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    boolean_options = ['keep-temp']
 | 
					    boolean_options = ['keep-temp', 'skip-build']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    default_format = { 'posix': 'gztar',
 | 
					    default_format = { 'posix': 'gztar',
 | 
				
			||||||
                       'nt': 'zip', }
 | 
					                       'nt': 'zip', }
 | 
				
			||||||
| 
						 | 
					@ -44,6 +46,7 @@ class bdist_dumb (Command):
 | 
				
			||||||
        self.format = None
 | 
					        self.format = None
 | 
				
			||||||
        self.keep_temp = 0
 | 
					        self.keep_temp = 0
 | 
				
			||||||
        self.dist_dir = None
 | 
					        self.dist_dir = None
 | 
				
			||||||
 | 
					        self.skip_build = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # initialize_options()
 | 
					    # initialize_options()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -71,10 +74,12 @@ class bdist_dumb (Command):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def run (self):
 | 
					    def run (self):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if not self.skip_build:
 | 
				
			||||||
            self.run_command('build')
 | 
					            self.run_command('build')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        install = self.reinitialize_command('install', reinit_subcommands=1)
 | 
					        install = self.reinitialize_command('install', reinit_subcommands=1)
 | 
				
			||||||
        install.root = self.bdist_dir
 | 
					        install.root = self.bdist_dir
 | 
				
			||||||
 | 
					        install.skip_build = self.skip_build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.announce("installing to %s" % self.bdist_dir)
 | 
					        self.announce("installing to %s" % self.bdist_dir)
 | 
				
			||||||
        self.run_command('install')
 | 
					        self.run_command('install')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,8 @@ class bdist_wininst (Command):
 | 
				
			||||||
                     "bitmap to use for the installer instead of python-powered logo"),
 | 
					                     "bitmap to use for the installer instead of python-powered logo"),
 | 
				
			||||||
                    ('title=', 't',
 | 
					                    ('title=', 't',
 | 
				
			||||||
                     "title to display on the installer background instead of default"),
 | 
					                     "title to display on the installer background instead of default"),
 | 
				
			||||||
 | 
					                    ('skip-build', None,
 | 
				
			||||||
 | 
					                     "skip rebuilding everything (for testing/debugging)"),
 | 
				
			||||||
                   ]
 | 
					                   ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    boolean_options = ['keep-temp']
 | 
					    boolean_options = ['keep-temp']
 | 
				
			||||||
| 
						 | 
					@ -49,6 +51,7 @@ class bdist_wininst (Command):
 | 
				
			||||||
        self.dist_dir = None
 | 
					        self.dist_dir = None
 | 
				
			||||||
        self.bitmap = None
 | 
					        self.bitmap = None
 | 
				
			||||||
        self.title = None
 | 
					        self.title = None
 | 
				
			||||||
 | 
					        self.skip_build = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # initialize_options()
 | 
					    # initialize_options()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,10 +82,12 @@ class bdist_wininst (Command):
 | 
				
			||||||
                  ("distribution contains extensions and/or C libraries; "
 | 
					                  ("distribution contains extensions and/or C libraries; "
 | 
				
			||||||
                   "must be compiled on a Windows 32 platform")
 | 
					                   "must be compiled on a Windows 32 platform")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if not self.skip_build:
 | 
				
			||||||
            self.run_command('build')
 | 
					            self.run_command('build')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        install = self.reinitialize_command('install')
 | 
					        install = self.reinitialize_command('install')
 | 
				
			||||||
        install.root = self.bdist_dir
 | 
					        install.root = self.bdist_dir
 | 
				
			||||||
 | 
					        install.skip_build = self.skip_build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        install_lib = self.reinitialize_command('install_lib')
 | 
					        install_lib = self.reinitialize_command('install_lib')
 | 
				
			||||||
        # we do not want to include pyc or pyo files
 | 
					        # we do not want to include pyc or pyo files
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -231,6 +231,7 @@ Bob Kahn
 | 
				
			||||||
Tamito Kajiyama
 | 
					Tamito Kajiyama
 | 
				
			||||||
Lou Kates
 | 
					Lou Kates
 | 
				
			||||||
Randall Kern
 | 
					Randall Kern
 | 
				
			||||||
 | 
					Robert Kern
 | 
				
			||||||
Magnus Kessler
 | 
					Magnus Kessler
 | 
				
			||||||
Lawrence Kesteloot
 | 
					Lawrence Kesteloot
 | 
				
			||||||
Vivek Khera
 | 
					Vivek Khera
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,6 +30,8 @@ Library
 | 
				
			||||||
  gettext.find an optional all argument. Translations will now fallback
 | 
					  gettext.find an optional all argument. Translations will now fallback
 | 
				
			||||||
  on a per-message basis.
 | 
					  on a per-message basis.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- distutils bdist commands now offer a --skip-build option.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Tools/Demos
 | 
					Tools/Demos
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Build
 | 
					Build
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue