More fixes for PEP 3147 compliance in packaging (#11254)

This commit is contained in:
Éric Araujo 2011-10-19 08:18:05 +02:00
parent 8ccd18fff3
commit 4b5a5f7bd5
4 changed files with 51 additions and 8 deletions

View file

@ -1,6 +1,7 @@
"""Install all modules (extensions and pure Python)."""
import os
import imp
import sys
import logging
@ -172,9 +173,10 @@ class install_lib(Command):
if ext != PYTHON_SOURCE_EXTENSION:
continue
if self.compile:
bytecode_files.append(py_file + "c")
bytecode_files.append(imp.cache_from_source(py_file))
if self.optimize > 0:
bytecode_files.append(py_file + "o")
bytecode_files.append(imp.cache_from_source(
py_file, debug_override=False))
return bytecode_files