summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-07-26 11:26:55 +0300
committerAlexander Golubev <fatzer2@gmail.com>2025-07-26 17:08:16 +0300
commit7f80ce875d688fc019b74a84508970b26c48a90b (patch)
tree921be1fc8bfdf9f97702b84c5ba733e47fd94d49
parent3babf23729161e92e7e4255fa6e3b8e0809b03b5 (diff)
downloadpytdeextensions-fix/build.tar.gz
pytdeextensions-fix/build.zip
Avoid byte-compiling in case it is disabledfix/build
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
-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')] )