@@ -173,6 +173,13 @@ def initialize_options (self):
173173
174174 self .record = None
175175
176+
177+ # -- Option finalizing methods -------------------------------------
178+ # (This is rather more involved than for most commands,
179+ # because this is where the policy for installing third-
180+ # party Python modules on various platforms given a wide
181+ # array of user input is decided. Yes, it's quite complex!)
182+
176183 def finalize_options (self ):
177184
178185 # This method (and its pliant slaves, like 'finalize_unix()',
@@ -450,6 +457,8 @@ def change_roots (self, *names):
450457 setattr (self , attr , change_root (self .root , getattr (self , attr )))
451458
452459
460+ # -- Command execution methods -------------------------------------
461+
453462 def run (self ):
454463
455464 # Obviously have to build before we can install
@@ -486,24 +495,18 @@ def run (self):
486495
487496 # run ()
488497
498+ def create_path_file (self ):
499+ filename = os .path .join (self .install_libbase ,
500+ self .path_file + ".pth" )
501+ if self .install_path_file :
502+ self .execute (write_file ,
503+ (filename , [self .extra_dirs ]),
504+ "creating %s" % filename )
505+ else :
506+ self .warn ("path file '%s' not created" % filename )
489507
490- # -- Predicates for sub-command list -------------------------------
491-
492- def has_lib (self ):
493- """Return true if the current distribution has any Python
494- modules to install."""
495- return (self .distribution .has_pure_modules () or
496- self .distribution .has_ext_modules ())
497-
498- def has_headers (self ):
499- return self .distribution .has_headers ()
500-
501- def has_scripts (self ):
502- return self .distribution .has_scripts ()
503-
504- def has_data (self ):
505- return self .distribution .has_data_files ()
506508
509+ # -- Reporting methods ---------------------------------------------
507510
508511 def get_outputs (self ):
509512 # This command doesn't have any outputs of its own, so just
@@ -515,7 +518,6 @@ def get_outputs (self):
515518
516519 return outputs
517520
518-
519521 def get_inputs (self ):
520522 # XXX gee, this looks familiar ;-(
521523 inputs = []
@@ -526,15 +528,23 @@ def get_inputs (self):
526528 return inputs
527529
528530
529- def create_path_file (self ):
530- filename = os .path .join (self .install_libbase ,
531- self .path_file + ".pth" )
532- if self .install_path_file :
533- self .execute (write_file ,
534- (filename , [self .extra_dirs ]),
535- "creating %s" % filename )
536- else :
537- self .warn ("path file '%s' not created" % filename )
531+ # -- Predicates for sub-command list -------------------------------
532+
533+ def has_lib (self ):
534+ """Return true if the current distribution has any Python
535+ modules to install."""
536+ return (self .distribution .has_pure_modules () or
537+ self .distribution .has_ext_modules ())
538+
539+ def has_headers (self ):
540+ return self .distribution .has_headers ()
541+
542+ def has_scripts (self ):
543+ return self .distribution .has_scripts ()
544+
545+ def has_data (self ):
546+ return self .distribution .has_data_files ()
547+
538548
539549 # 'sub_commands': a list of commands this command might have to run to
540550 # get its work done. See cmd.py for more info.
0 commit comments