mirror of https://github.com/commaai/cereal.git
rebuild cython extensions when python/cython/distuils change
This commit is contained in:
parent
f725dcd617
commit
7b78cda876
|
@ -1,4 +1,4 @@
|
||||||
Import('env', 'arch', 'zmq')
|
Import('env', 'arch', 'zmq', 'cython_dependencies')
|
||||||
|
|
||||||
gen_dir = Dir('gen')
|
gen_dir = Dir('gen')
|
||||||
messaging_dir = Dir('messaging')
|
messaging_dir = Dir('messaging')
|
||||||
|
@ -56,9 +56,9 @@ Depends('messaging/bridge.cc', services_h)
|
||||||
#env.Program('messaging/demo', ['messaging/demo.cc'], LIBS=[messaging_lib, 'zmq'])
|
#env.Program('messaging/demo', ['messaging/demo.cc'], LIBS=[messaging_lib, 'zmq'])
|
||||||
|
|
||||||
|
|
||||||
env.Command(['messaging/messaging_pyx.so'],
|
env.Command(['messaging/messaging_pyx.so', 'messaging/messaging_pyx.cpp'],
|
||||||
[messaging_lib, 'messaging/messaging_pyx_setup.py', 'messaging/messaging_pyx.pyx', 'messaging/messaging.pxd'],
|
cython_dependencies + [messaging_lib, 'messaging/messaging_pyx_setup.py', 'messaging/messaging_pyx.pyx', 'messaging/messaging.pxd'],
|
||||||
"cd " + messaging_dir.path + " && python3 messaging_pyx_setup.py build_ext --inplace")
|
"cd " + messaging_dir.path + " && python3 messaging_pyx_setup.py build_ext --inplace")
|
||||||
|
|
||||||
|
|
||||||
if GetOption('test'):
|
if GetOption('test'):
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
|
import Cython
|
||||||
|
import distutils
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
zmq = 'zmq'
|
zmq = 'zmq'
|
||||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||||
|
|
||||||
|
# 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')
|
||||||
|
|
||||||
cereal_dir = Dir('.')
|
cereal_dir = Dir('.')
|
||||||
|
|
||||||
cpppath = [
|
cpppath = [
|
||||||
|
|
Loading…
Reference in New Issue