pynini
pynini copied to clipboard
[do not merge] adding mason-installed lib and include dirs
Opening this PR for instructive purposes. This is just to show how mason can be used to install Pynini's C++ dependencies. The advantage of using mason is similar to the advantages of virtual environments: nothing depends on the state of the system or its shared libraries. The dependencies can be installed and even interlinked local to the project, making it easy to build/clean/update.
The steps to install become:
- clone mason locally (you can also use submodule or do a simple curl install)
cd /path/to/Pynini
git clone [email protected]:mapbox/mason.git .mason
- install re2 and openfst. If you need updated versions of either package, they need to be added to mason as a PR. https://github.com/mapbox/mason/pull/580 is an example of updating OpenFST, and should illustrate what needs to be done. Contact me for help if anything's not clear, though.
.mason/mason install re2 2018-08-01
.mason/mason install openfst 1.6.7
This will create a mason_packages folder in the pwd, structured similarly to this (example from a laptop running OSX):
mason_packages/
└── osx-x86_64
├── openfst
│ └── 1.6.7
└── re2
└── 2017-08-01
- The changes to
setup.pyin this PR now allow you to make use of the mason-installed header files and libraries, so you can continue with installation as directed in the Pynini documentation.
+1.