Skip to content

Commit bfe725f

Browse files
committed
task: updated README
1 parent 01a5fd7 commit bfe725f

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,21 @@ To build `C++` code, I use [meson][web-meson]. To manage `python` code, I use
7979

8080
To build the `C++` code:
8181
```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
8397

8498
# "build-dir" is the name I use for my build directory
8599
meson setup build-dir
@@ -100,6 +114,27 @@ brew install poetry
100114
poetry install
101115
```
102116

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+
103138

104139
<!-- resources -->
105140
[web-substrait]: https://substrait.io/

0 commit comments

Comments
 (0)