mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 16:33:57 +08:00
SCons: respect cache read only (#29437)
* respect readonly * gitignore and move to correct folder * also copy old
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@ venv/
|
||||
.tags
|
||||
.ipynb_checkpoints
|
||||
.idea
|
||||
.moc_files
|
||||
.overlay_init
|
||||
.overlay_consistent
|
||||
.sconsign.dblite
|
||||
|
||||
14
SConstruct
14
SConstruct
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
@@ -334,7 +335,18 @@ qt_flags = [
|
||||
qt_env['CXXFLAGS'] += qt_flags
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui']
|
||||
qt_env['LIBS'] = qt_libs
|
||||
qt_env['QT3_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
# Have to respect cache-readonly
|
||||
if GetOption('cache_readonly'):
|
||||
local_moc_files_dir = Dir("#.moc_files").abspath
|
||||
cache_moc_files_dir = cache_dir + "/moc_files"
|
||||
if os.path.exists(local_moc_files_dir):
|
||||
shutil.rmtree(local_moc_files_dir)
|
||||
if os.path.exists(cache_moc_files_dir):
|
||||
shutil.copytree(cache_moc_files_dir, local_moc_files_dir)
|
||||
qt_env['QT3_MOCHPREFIX'] = local_moc_files_dir + "/moc_"
|
||||
else:
|
||||
qt_env['QT3_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
if GetOption("clazy"):
|
||||
checks = [
|
||||
|
||||
Reference in New Issue
Block a user