[Python-checkins] python/dist/src/Lib/distutils/command install_lib.py, 1.42, 1.43

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Wed Jul 28 16:55:12 CEST 2004


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

Modified Files:
	install_lib.py 
Log Message:
Since build_py handles package data installation, the list of outputs
can contain more than just .py files.  Make sure we only report
bytecode files for the .py files.


Index: install_lib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_lib.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** install_lib.py	19 Nov 2002 13:12:28 -0000	1.42
--- install_lib.py	28 Jul 2004 14:55:10 -0000	1.43
***************
*** 8,11 ****
--- 8,16 ----
  from distutils.errors import DistutilsOptionError
  
+ 
+ # Extension for Python source files.
+ PYTHON_SOURCE_EXTENSION = os.extsep + "py"
+ 
+ 
  class install_lib (Command):
  
***************
*** 156,159 ****
--- 161,170 ----
          bytecode_files = []
          for py_file in py_filenames:
+             # Since build_py handles package data installation, the
+             # list of outputs can contain more than just .py files.
+             # Make sure we only report bytecode for the .py files.
+             ext = os.path.splitext(os.path.normcase(py_file))[1]
+             if ext != PYTHON_SOURCE_EXTENSION:
+                 continue
              if self.compile:
                  bytecode_files.append(py_file + "c")



More information about the Python-checkins mailing list