summaryrefslogtreecommitdiffstats
path: root/src/tdedistutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tdedistutils.py')
-rw-r--r--src/tdedistutils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tdedistutils.py b/src/tdedistutils.py
index aade55e..e5c1e40 100644
--- a/src/tdedistutils.py
+++ b/src/tdedistutils.py
@@ -365,9 +365,10 @@ class InstallApplicationDataAndLinks(install_data):
prefix = prefix + os.sep
self.outfiles.extend(compile_tqtdesigner(self.outfiles, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run))
- # Byte compile the .py files
- from distutils.util import byte_compile
- byte_compile(self.outfiles, optimize=0, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run)
+ if not sys.dont_write_bytecode:
+ # Byte compile the .py files (unless it is disabled)
+ from distutils.util import byte_compile
+ byte_compile(self.outfiles, optimize=0, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run)
# Add the .pyc files to the list of outfiles.
self.outfiles.extend( [item+'c' for item in self.outfiles if item.endswith('.py')] )