summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/command/build_py.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-17 01:31:51 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-17 01:31:51 (GMT)
commit7724a6c10c56a1b14b4933de368e672eae840f47 (patch)
tree1b3bd60ab9b79bd018cbc942a8e12140b2e18576 /Lib/packaging/command/build_py.py
parent37ccd6f794539e0678b7a7ad938e571cc73e106c (diff)
downloadcpython-7724a6c10c56a1b14b4933de368e672eae840f47.zip
cpython-7724a6c10c56a1b14b4933de368e672eae840f47.tar.gz
cpython-7724a6c10c56a1b14b4933de368e672eae840f47.tar.bz2
Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available in 3.3; the distutils2 backport still has the conditionals. I also renamed an internal misnamed method and fixed a few things (“packaging2” name, stray print, unused import, fd leak).
Diffstat (limited to 'Lib/packaging/command/build_py.py')
-rw-r--r--Lib/packaging/command/build_py.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/packaging/command/build_py.py b/Lib/packaging/command/build_py.py
index 7baa6e4..0eafffa 100644
--- a/Lib/packaging/command/build_py.py
+++ b/Lib/packaging/command/build_py.py
@@ -388,7 +388,7 @@ class build_py(Command, Mixin2to3):
self.build_module(module, module_file, package)
def byte_compile(self, files):
- if hasattr(sys, 'dont_write_bytecode') and sys.dont_write_bytecode:
+ if sys.dont_write_bytecode:
logger.warning('%s: byte-compiling is disabled, skipping.',
self.get_command_name())
return