diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2025-07-26 11:26:55 +0300 |
|---|---|---|
| committer | Alexander Golubev <fatzer2@gmail.com> | 2025-07-28 16:21:16 +0300 |
| commit | 5d29a06806ad38ceac4a82b73022f60de9eaa9f1 (patch) | |
| tree | 6e9197b5930b062befd2896236f7bc59a3c0eb06 /src/tdedistutils.py | |
| parent | d25660c894ec70a75f4d292a1c8cdc4694818c69 (diff) | |
| download | pytdeextensions-5d29a068.tar.gz pytdeextensions-5d29a068.zip | |
Avoid byte-compiling in case it is disabled
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 32d9a1e50ba6a0cc72e546934bf80d6361ad55f9)
Diffstat (limited to 'src/tdedistutils.py')
| -rw-r--r-- | src/tdedistutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tdedistutils.py b/src/tdedistutils.py index 3a03007..5b5041d 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')] ) |
