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.
cd /path/to/Pynini
git clone git@github.com: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.
The changes to setup.py in 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.
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:
This will create a
mason_packages
folder in the pwd, structured similarly to this (example from a laptop running OSX):setup.py
in 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.