mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
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
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import Cython
|
||||
import distutils
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -12,6 +14,10 @@ AddOption('--asan',
|
||||
action='store_true',
|
||||
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()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
|
||||
2
cereal
2
cereal
Submodule cereal updated: f725dcd617...7b78cda876
@@ -1,6 +1,6 @@
|
||||
Import('env')
|
||||
Import('env', 'cython_dependencies')
|
||||
|
||||
# parser
|
||||
env.Command(['common_pyx.so'],
|
||||
['common_pyx_setup.py', 'clock.pyx'],
|
||||
"cd common && python3 common_pyx_setup.py build_ext --inplace")
|
||||
# Build cython clock module
|
||||
env.Command(['common_pyx.so', 'clock.cpp'],
|
||||
cython_dependencies + ['common_pyx_setup.py', 'clock.pyx'],
|
||||
"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'],
|
||||
['simple_kalman_impl.pyx', 'simple_kalman_impl.pxd', 'simple_kalman_setup.py'],
|
||||
"cd common/kalman && python3 simple_kalman_setup.py build_ext --inplace")
|
||||
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")
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
Import('env')
|
||||
Import('env', 'cython_dependencies')
|
||||
|
||||
d = Dir('.')
|
||||
|
||||
env.Command(
|
||||
['transformations.so'],
|
||||
['transformations.pxd', 'transformations.pyx',
|
||||
'coordinates.cc', 'orientation.cc', 'coordinates.hpp', 'orientation.hpp'],
|
||||
'cd ' + d.path + ' && python3 setup.py build_ext --inplace')
|
||||
env.Command(['transformations.so'],
|
||||
cython_dependencies + ['transformations.pxd', 'transformations.pyx',
|
||||
'coordinates.cc', 'orientation.cc', 'coordinates.hpp', 'orientation.hpp'],
|
||||
'cd ' + d.path + ' && python3 setup.py build_ext --inplace')
|
||||
|
||||
2
opendbc
2
opendbc
Submodule opendbc updated: 2265c9c3dc...9ee0069ecc
@@ -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.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
|
||||
|
||||
env.Command(['boardd_api_impl.so'],
|
||||
['libcan_list_to_can_capnp.a', 'boardd_api_impl.pyx', 'boardd_setup.py'],
|
||||
"cd selfdrive/boardd && python3 boardd_setup.py build_ext --inplace")
|
||||
env.Command(['boardd_api_impl.so', 'boardd_api_impl.cpp'],
|
||||
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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user