Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] adding mason-installed lib and include dirs #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

boblannon
Copy link

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:

  1. 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
  1. install re2 and openfst. If you need updated versions of either package, they need to be added to mason as a PR. openfst 1.6.7 mapbox/mason#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
  1. 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.

@kylebgorman
Copy link
Owner

+1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants