mirror of https://github.com/1okko/openpilot.git
unpin numpy (#33132)
* unlock numpy * remove old cache * sheel * lock * remove temp * depends * export * put this back * use __version__ * move this --------- Co-authored-by: quebec <quebec@quebec.attlocal.net>
This commit is contained in:
parent
0b29db5c3e
commit
9536dd07c6
|
@ -229,7 +229,7 @@ env = Environment(
|
||||||
COMPILATIONDB_USE_ABSPATH=True,
|
COMPILATIONDB_USE_ABSPATH=True,
|
||||||
REDNOSE_ROOT="#",
|
REDNOSE_ROOT="#",
|
||||||
tools=["default", "cython", "compilation_db", "rednose_filter"],
|
tools=["default", "cython", "compilation_db", "rednose_filter"],
|
||||||
toolpath=["#rednose_repo/site_scons/site_tools"],
|
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
|
||||||
)
|
)
|
||||||
|
|
||||||
if arch == "Darwin":
|
if arch == "Darwin":
|
||||||
|
@ -268,7 +268,8 @@ if arch == "Darwin":
|
||||||
else:
|
else:
|
||||||
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
||||||
|
|
||||||
Export('envCython')
|
np_version = SCons.Script.Value(np.__version__)
|
||||||
|
Export('envCython', 'np_version')
|
||||||
|
|
||||||
# Qt build environment
|
# Qt build environment
|
||||||
qt_env = env.Clone()
|
qt_env = env.Clone()
|
||||||
|
|
|
@ -26,7 +26,7 @@ dependencies = [
|
||||||
"pycapnp",
|
"pycapnp",
|
||||||
"Cython",
|
"Cython",
|
||||||
"setuptools",
|
"setuptools",
|
||||||
"numpy < 2.0.0", # control does not support numpy 2
|
"numpy",
|
||||||
|
|
||||||
# body / webrtcd
|
# body / webrtcd
|
||||||
"aiohttp",
|
"aiohttp",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python')
|
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'np_version')
|
||||||
|
|
||||||
gen = "c_generated_code"
|
gen = "c_generated_code"
|
||||||
|
|
||||||
|
@ -88,3 +88,4 @@ lenv2.Command(libacados_ocp_solver_c,
|
||||||
f' {acados_ocp_solver_pyx.get_labspath()}')
|
f' {acados_ocp_solver_pyx.get_labspath()}')
|
||||||
lib_cython = lenv2.Program(f'{gen}/acados_ocp_solver_pyx.so', [libacados_ocp_solver_c])
|
lib_cython = lenv2.Program(f'{gen}/acados_ocp_solver_pyx.so', [libacados_ocp_solver_c])
|
||||||
lenv2.Depends(lib_cython, lib_solver)
|
lenv2.Depends(lib_cython, lib_solver)
|
||||||
|
lenv2.Depends(libacados_ocp_solver_c, np_version)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python')
|
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'np_version')
|
||||||
|
|
||||||
gen = "c_generated_code"
|
gen = "c_generated_code"
|
||||||
|
|
||||||
|
@ -94,3 +94,4 @@ lenv2.Command(libacados_ocp_solver_c,
|
||||||
f' {acados_ocp_solver_pyx.get_labspath()}')
|
f' {acados_ocp_solver_pyx.get_labspath()}')
|
||||||
lib_cython = lenv2.Program(f'{gen}/acados_ocp_solver_pyx.so', [libacados_ocp_solver_c])
|
lib_cython = lenv2.Program(f'{gen}/acados_ocp_solver_pyx.so', [libacados_ocp_solver_c])
|
||||||
lenv2.Depends(lib_cython, lib_solver)
|
lenv2.Depends(lib_cython, lib_solver)
|
||||||
|
lenv2.Depends(libacados_ocp_solver_c, np_version)
|
||||||
|
|
|
@ -2,14 +2,17 @@ import re
|
||||||
import SCons
|
import SCons
|
||||||
from SCons.Action import Action
|
from SCons.Action import Action
|
||||||
from SCons.Scanner import Scanner
|
from SCons.Scanner import Scanner
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
pyx_from_import_re = re.compile(r'^from\s+(\S+)\s+cimport', re.M)
|
pyx_from_import_re = re.compile(r'^from\s+(\S+)\s+cimport', re.M)
|
||||||
pyx_import_re = re.compile(r'^cimport\s+(\S+)', re.M)
|
pyx_import_re = re.compile(r'^cimport\s+(\S+)', re.M)
|
||||||
cdef_import_re = re.compile(r'^cdef extern from\s+.(\S+).:', re.M)
|
cdef_import_re = re.compile(r'^cdef extern from\s+.(\S+).:', re.M)
|
||||||
|
|
||||||
|
np_version = SCons.Script.Value(np.__version__)
|
||||||
|
|
||||||
def pyx_scan(node, env, path, arg=None):
|
def pyx_scan(node, env, path, arg=None):
|
||||||
contents = node.get_text_contents()
|
contents = node.get_text_contents()
|
||||||
|
env.Depends(str(node).split('.')[0] + env['CYTHONCFILESUFFIX'], np_version)
|
||||||
|
|
||||||
# from <module> cimport ...
|
# from <module> cimport ...
|
||||||
matches = pyx_from_import_re.findall(contents)
|
matches = pyx_from_import_re.findall(contents)
|
||||||
|
|
6
uv.lock
6
uv.lock
|
@ -4977,11 +4977,11 @@ wheels = [
|
||||||
|
|
||||||
[[distribution]]
|
[[distribution]]
|
||||||
name = "setuptools"
|
name = "setuptools"
|
||||||
version = "71.1.0"
|
version = "72.1.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/32/c0/5b8013b5a812701c72e3b1e2b378edaa6514d06bee6704a5ab0d7fa52931/setuptools-71.1.0.tar.gz", hash = "sha256:032d42ee9fb536e33087fb66cac5f840eb9391ed05637b3f2a76a7c8fb477936", size = 2422233 }
|
sdist = { url = "https://files.pythonhosted.org/packages/5e/11/487b18cc768e2ae25a919f230417983c8d5afa1b6ee0abd8b6db0b89fa1d/setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec", size = 2419487 }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/51/a0/ee460cc54e68afcf33190d198299c9579a5eafeadef0016ae8563237ccb6/setuptools-71.1.0-py3-none-any.whl", hash = "sha256:33874fdc59b3188304b2e7c80d9029097ea31627180896fb549c578ceb8a0855", size = 2341722 },
|
{ url = "https://files.pythonhosted.org/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl", hash = "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1", size = 2337965 },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[distribution]]
|
[[distribution]]
|
||||||
|
|
Loading…
Reference in New Issue