move to nested opendbc/ (#1069)

* move to nested opendbc/

* get CI working / similar to msgq

* move dbcs to dbc/

* run pre-commit outside docker

* move generator to dbc/

* fix path in print
This commit is contained in:
Shane Smiskol
2024-07-31 22:46:43 -07:00
committed by GitHub
parent cd61e17f3c
commit a40652d341
173 changed files with 23 additions and 23 deletions

16
.gitignore vendored
View File

@@ -8,11 +8,11 @@
.DS_Store
.sconsign.dblite
can/*.so
can/*.a
can/build/
can/obj/
can/packer_pyx.cpp
can/parser_pyx.cpp
can/packer_pyx.html
can/parser_pyx.html
opendbc/can/*.so
opendbc/can/*.a
opendbc/can/build/
opendbc/can/obj/
opendbc/can/packer_pyx.cpp
opendbc/can/parser_pyx.cpp
opendbc/can/packer_pyx.html
opendbc/can/parser_pyx.html

View File

@@ -56,6 +56,6 @@ repos:
hooks:
- id: generator
name: dbc generator
entry: generator/test_generator.py
entry: opendbc/dbc/generator/test_generator.py
language: script
pass_filenames: false

View File

@@ -40,12 +40,8 @@ RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt
RUN pip3 install --break-system-packages --no-cache-dir pre-commit==2.15.0 pylint==2.17.4
WORKDIR /project/opendbc
ENV PYTHONPATH=/project
ENV PYTHONPATH=/project/opendbc
COPY . .
COPY SConstruct /project
COPY ./site_scons /project/site_scons
COPY .gitignore /project/.gitignore
RUN ls && rm -rf .git && cd ../ && \
RUN ls && rm -rf .git && \
scons -c && scons -j$(nproc) \

View File

@@ -1,2 +0,0 @@
import os
DBC_PATH = os.path.dirname(os.path.abspath(__file__))

3
opendbc/__init__.py Normal file
View File

@@ -0,0 +1,3 @@
import os
DBC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dbc')

View File

@@ -3,7 +3,7 @@ Import('env', 'envCython', 'common', 'arch')
import os
envDBC = env.Clone()
dbc_file_path = '-DDBC_FILE_PATH=\'"%s"\'' % (envDBC.Dir("..").abspath)
dbc_file_path = '-DDBC_FILE_PATH=\'"%s"\'' % (envDBC.Dir("../dbc").abspath)
envDBC['CXXFLAGS'] += [dbc_file_path]
src = ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]
libs = [common, "zmq"]

View File

@@ -222,7 +222,7 @@ DBC* dbc_parse(const std::string& dbc_path) {
const std::string get_dbc_root_path() {
char *basedir = std::getenv("BASEDIR");
if (basedir != NULL) {
return std::string(basedir) + "/opendbc";
return std::string(basedir) + "/opendbc/dbc";
} else {
return DBC_FILE_PATH;
}

0
opendbc/dbc/__init__.py Normal file
View File

Some files were not shown because too many files have changed in this diff Show More