@@ -79,7 +79,21 @@ To build `C++` code, I use [meson][web-meson]. To manage `python` code, I use
79
79
80
80
To build the ` C++ ` code:
81
81
``` bash
82
- brew install meson ninja
82
+ brew install meson ninja git-lfs
83
+
84
+ git clone https://github.com/drin/mohair.git
85
+ pushd mohair
86
+
87
+ # Optional: these submodules are only needed for regenerating protobuf code
88
+ # git submodule init -- submodules/substrait-proto
89
+ # git submodule update -- submodules/substrait-proto
90
+ # git submodule init -- submodules/mohair-proto
91
+ # git submodule update -- submodules/mohair-proto
92
+ # NOTE: to regenerate, refer to the `Compiling Protobuf Wrappers` section
93
+
94
+ # Optional: git-lfs is only really needed for getting examples and such
95
+ # git lfs install --local
96
+ # git lfs pull
83
97
84
98
# "build-dir" is the name I use for my build directory
85
99
meson setup build-dir
@@ -100,6 +114,27 @@ brew install poetry
100
114
poetry install
101
115
```
102
116
117
+ ##### Compiling Protobuf Wrappers
118
+
119
+ This will be done at a future date (it shouldn't be important now).
120
+
121
+ The short story is:
122
+ ``` bash
123
+ buf generate --template buf.gen.yaml submodules/substrait-proto
124
+ buf generate --template buf.gen.yaml submodules/mohair-proto
125
+
126
+ # NOTE: the below fixes don't accommodate the extensions.proto includes because of the
127
+ # extra nesting
128
+
129
+ # For fixing the includes in the C++ code
130
+ # sed -i '' 's/include ["]substrait[/]/include "..\/substrait\//' (grep -Rl "include \"substrait" src/cpp/query/substrait/)
131
+ # sed -i '' 's/include ["]mohair[/]/include "..\/mohair\//' (grep -Rl "include \"mohair" src/cpp/query/mohair/)
132
+
133
+ # For fixing the imports in the python code
134
+ # sed -i '' 's/from substrait/from mohair.substrait/' (grep -Rl "from substrait" src/python/mohair/substrait/)
135
+ # sed -i '' 's/from substrait/from mohair.substrait/' (grep -Rl "from substrait" src/python/mohair/mohair/)
136
+ ```
137
+
103
138
104
139
<!-- resources -->
105
140
[ web-substrait ] : https://substrait.io/
0 commit comments