From 8423e1ed14ac1691c2863c6e8cac9230cf558d7b Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 19 Mar 2004 20:53:14 +0000 Subject: Initial checkin of setuptools 0.0.1. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040869 --- setuptools/command/install_lib.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 setuptools/command/install_lib.py (limited to 'setuptools/command/install_lib.py') diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py new file mode 100644 index 00000000..ec406f7e --- /dev/null +++ b/setuptools/command/install_lib.py @@ -0,0 +1,17 @@ +from distutils.command.install_lib import install_lib as _install_lib + +class install_lib(_install_lib): + """Don't add compiled flags to filenames of non-Python files""" + + def _bytecode_filenames (self, py_filenames): + bytecode_files = [] + for py_file in py_filenames: + if not py_file.endswith('.py'): + continue + if self.compile: + bytecode_files.append(py_file + "c") + if self.optimize > 0: + bytecode_files.append(py_file + "o") + + return bytecode_files + -- cgit v1.2.1