File: install_lib.py

package info (click to toggle)
python-setuptools 0.0.1.041214-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 232 kB
  • ctags: 264
  • sloc: python: 931; makefile: 37
file content (16 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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