churchyard / rpms / python38

Forked from rpms/python38 2 years ago
Clone
ef5c6f
diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py
ef5c6f
index c89d5ef..dd61621 100644
ef5c6f
--- a/Lib/distutils/cmd.py
ef5c6f
+++ b/Lib/distutils/cmd.py
ef5c6f
@@ -296,7 +296,8 @@ class Command:
ef5c6f
         finalized command object.
ef5c6f
         """
ef5c6f
         cmd_obj = self.distribution.get_command_obj(command, create)
ef5c6f
-        cmd_obj.ensure_finalized()
ef5c6f
+        if cmd_obj is not None:
ef5c6f
+            cmd_obj.ensure_finalized()
ef5c6f
         return cmd_obj
ef5c6f
ef5c6f
     # XXX rename to 'get_reinitialized_command()'? (should do the
ef5c6f
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
ef5c6f
index 8174192..30ca739 100644
ef5c6f
--- a/Lib/distutils/command/install.py
ef5c6f
+++ b/Lib/distutils/command/install.py
ef5c6f
@@ -122,6 +122,8 @@ class install(Command):
ef5c6f
          "force installation (overwrite any existing files)"),
ef5c6f
         ('skip-build', None,
ef5c6f
          "skip rebuilding everything (for testing/debugging)"),
ef5c6f
+        ('executable=', 'e',
ef5c6f
+         "specify final destination interpreter path (install.py)"),
ef5c6f
ef5c6f
         # Where to install documentation (eventually!)
ef5c6f
         #('doc-format=', None, "format of documentation to generate"),
ef5c6f
@@ -194,6 +196,7 @@ class install(Command):
ef5c6f
         # directory not in sys.path.
ef5c6f
         self.force = 0
ef5c6f
         self.skip_build = 0
ef5c6f
+        self.executable = None
ef5c6f
         self.warn_dir = 1
ef5c6f
ef5c6f
         # These are only here as a conduit from the 'build' command to the
ef5c6f
@@ -365,6 +368,9 @@ class install(Command):
ef5c6f
                                    ('build_base', 'build_base'),
ef5c6f
                                    ('build_lib', 'build_lib'))
ef5c6f
ef5c6f
+        if self.executable is None:
ef5c6f
+            self.executable = os.path.normpath(sys.executable)
ef5c6f
+
ef5c6f
         # Punt on doc directories for now -- after all, we're punting on
ef5c6f
         # documentation completely!
ef5c6f