Rebuild cython extensions when dependency version changes (#1886)

* rebuild cython extensions when python/cython/distutils version changes

* submodules and boardd

* kalman and transformations
old-commit-hash: 165e14d103
commatwo_master
Adeeb Shihadeh 5 years ago committed by GitHub
parent 1930c812d7
commit 993eeaf694
  1. 6
      SConstruct
  2. 2
      cereal
  3. 8
      common/SConscript
  4. 4
      common/kalman/SConscript
  5. 7
      common/transformations/SConscript
  6. 2
      opendbc
  7. 6
      selfdrive/boardd/SConscript

@ -1,3 +1,5 @@
import Cython
import distutils
import os import os
import shutil import shutil
import subprocess import subprocess
@ -12,6 +14,10 @@ AddOption('--asan',
action='store_true', action='store_true',
help='turn on ASAN') help='turn on ASAN')
# Rebuild cython extensions if python, distutils, or cython change
cython_dependencies = [Value(v) for v in (sys.version, distutils.__version__, Cython.__version__)]
Export('cython_dependencies')
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin": if platform.system() == "Darwin":
arch = "Darwin" arch = "Darwin"

@ -1 +1 @@
Subproject commit f725dcd617b0ff577ad5caee8b9b3c861d6be4a8 Subproject commit 7b78cda8767a79c4ac6797d71fbd7bcb03e1f737

@ -1,6 +1,6 @@
Import('env') Import('env', 'cython_dependencies')
# parser # Build cython clock module
env.Command(['common_pyx.so'], env.Command(['common_pyx.so', 'clock.cpp'],
['common_pyx_setup.py', 'clock.pyx'], cython_dependencies + ['common_pyx_setup.py', 'clock.pyx'],
"cd common && python3 common_pyx_setup.py build_ext --inplace") "cd common && python3 common_pyx_setup.py build_ext --inplace")

@ -1,6 +1,6 @@
Import('env') Import('env', 'cython_dependencies')
env.Command(['simple_kalman_impl.so'], env.Command(['simple_kalman_impl.so'],
['simple_kalman_impl.pyx', 'simple_kalman_impl.pxd', 'simple_kalman_setup.py'], cython_dependencies + ['simple_kalman_impl.pyx', 'simple_kalman_impl.pxd', 'simple_kalman_setup.py'],
"cd common/kalman && python3 simple_kalman_setup.py build_ext --inplace") "cd common/kalman && python3 simple_kalman_setup.py build_ext --inplace")

@ -1,9 +1,8 @@
Import('env') Import('env', 'cython_dependencies')
d = Dir('.') d = Dir('.')
env.Command( env.Command(['transformations.so'],
['transformations.so'], cython_dependencies + ['transformations.pxd', 'transformations.pyx',
['transformations.pxd', 'transformations.pyx',
'coordinates.cc', 'orientation.cc', 'coordinates.hpp', 'orientation.hpp'], 'coordinates.cc', 'orientation.cc', 'coordinates.hpp', 'orientation.hpp'],
'cd ' + d.path + ' && python3 setup.py build_ext --inplace') 'cd ' + d.path + ' && python3 setup.py build_ext --inplace')

@ -1 +1 @@
Subproject commit 2265c9c3dcff4d58a9cc2cd434a6c704350a4729 Subproject commit 9ee0069ecc01c154a0b77130f0da02b10cacbdfa

@ -1,9 +1,9 @@
Import('env', 'common', 'cereal', 'messaging') Import('env', 'common', 'cereal', 'messaging', 'cython_dependencies')
env.Program('boardd.cc', LIBS=['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj']) env.Program('boardd.cc', LIBS=['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj'])
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc']) env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
env.Command(['boardd_api_impl.so'], env.Command(['boardd_api_impl.so', 'boardd_api_impl.cpp'],
['libcan_list_to_can_capnp.a', 'boardd_api_impl.pyx', 'boardd_setup.py'], cython_dependencies + ['libcan_list_to_can_capnp.a', 'boardd_api_impl.pyx', 'boardd_setup.py'],
"cd selfdrive/boardd && python3 boardd_setup.py build_ext --inplace") "cd selfdrive/boardd && python3 boardd_setup.py build_ext --inplace")

Loading…
Cancel
Save