[Python-checkins] python/dist/src/Lib/distutils/command build.py, 1.34, 1.35 build_scripts.py, 1.23, 1.24

loewis at users.sourceforge.net loewis at users.sourceforge.net
Wed Aug 25 13:37:46 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16100/Lib/distutils/command

Modified Files:
	build.py build_scripts.py 
Log Message:
Patch #736857, #736859: Add -e option to build_scripts.


Index: build.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- build.py	19 Nov 2002 13:12:28 -0000	1.34
+++ build.py	25 Aug 2004 11:37:43 -0000	1.35
@@ -40,6 +40,8 @@
          "compile extensions and libraries with debugging information"),
         ('force', 'f',
          "forcibly build everything (ignore file timestamps)"),
+        ('executable=', 'e',
+         "specify final destination interpreter path (build.py)"),
         ]
 
     boolean_options = ['debug', 'force']
@@ -61,6 +63,7 @@
         self.compiler = None
         self.debug = None
         self.force = 0
+        self.executable = None
 
     def finalize_options (self):
 
@@ -93,6 +96,8 @@
             self.build_scripts = os.path.join(self.build_base,
                                               'scripts-' + sys.version[0:3])
 
+        if self.executable is None:
+            self.executable = os.path.normpath(sys.executable)
     # finalize_options ()
 
 

Index: build_scripts.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_scripts.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- build_scripts.py	18 Jul 2004 06:14:43 -0000	1.23
+++ build_scripts.py	25 Aug 2004 11:37:43 -0000	1.24
@@ -24,6 +24,7 @@
     user_options = [
         ('build-dir=', 'd', "directory to \"build\" (copy) to"),
         ('force', 'f', "forcibly build everything (ignore file timestamps"),
+        ('executable=', 'e', "specify final destination interpreter path"),
         ]
 
     boolean_options = ['force']
@@ -33,12 +34,14 @@
         self.build_dir = None
         self.scripts = None
         self.force = None
+        self.executable = None
         self.outfiles = None
 
     def finalize_options (self):
         self.set_undefined_options('build',
                                    ('build_scripts', 'build_dir'),
-                                   ('force', 'force'))
+                                   ('force', 'force'),
+                                   ('executable', 'executable'))
         self.scripts = self.distribution.scripts
 
     def get_source_files(self):
@@ -95,7 +98,7 @@
                     outf = open(outfile, "w")
                     if not sysconfig.python_build:
                         outf.write("#!%s%s\n" %
-                                   (os.path.normpath(sys.executable),
+                                   (self.executable,
                                     post_interp))
                     else:
                         outf.write("#!%s%s\n" %



More information about the Python-checkins mailing list