Skip to content

Attempt to run 'protoc' without a prefix if one isn't found.#691

Merged
Kenadia merged 1 commit intogoogle:masterfrom
charlesnicholson:relax-protoc
Jan 10, 2018
Merged

Attempt to run 'protoc' without a prefix if one isn't found.#691
Kenadia merged 1 commit intogoogle:masterfrom
charlesnicholson:relax-protoc

Conversation

@charlesnicholson
Copy link
Contributor

If protoc isn't found via pkg-config or at the hard-coded locations, attempt to just invoke it without any prefix path. This allows for protobuf to be sandboxed (in a git repository, for example).

This change preserves the existing behavior by explicitly preferring '/usr/bin/protoc' on Linux and '/usr/local/bin/protoc' on OSX, but also allows control of the specific protoc by manipulating the path beforehand.

Fix a Python3 bug, convert subprocess.check_output to a string and append standard (non-byte) strings to it. This is redundant but functional in Python2.

…attempt to just invoke it without any prefix path. This preserves the existing behavior, but also allows control of the specific protoc by manipulating the path beforehand.
@charlesnicholson
Copy link
Contributor Author

@wallacbe FYI

@wallacbe
Copy link

wallacbe commented Jan 9, 2018

This OK to merge?

@Kenadia
Copy link
Contributor

Kenadia commented Jan 10, 2018

LGTM too. Also tried it and it works for me (mac)

@Kenadia Kenadia merged commit cd8a9cd into google:master Jan 10, 2018
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.

4 participants