Skip to content

protobuf: fix --with-python build with Python 3.7#34478

Merged
fxcoudert merged 1 commit intoHomebrew:masterfrom
benmwebb:protobuf_3611_fix
Nov 27, 2018
Merged

protobuf: fix --with-python build with Python 3.7#34478
fxcoudert merged 1 commit intoHomebrew:masterfrom
benmwebb:protobuf_3611_fix

Conversation

@benmwebb
Copy link
Contributor

If built using --with-python, compilation fails with Python 3.7 because the Python folks changed their C API such that PyUnicode_AsUTF8AndSize() now returns a const char* rather than a char*. Add a patch to work around.

This is the same patch that was applied for protobuf 3.6.1 in #29660. That patch was removed in the upgrade of the formula to protobuf 3.6.1.1 in 3a6b38b6, perhaps because it was incorrectly assumed the patch was incorporated upstream in the 3.6 branch.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

If built using --with-python, compilation fails with
Python 3.7 because the Python folks changed their C
API such that PyUnicode_AsUTF8AndSize() now returns
a const char* rather than a char*. Add a patch to
work around.

This is the same patch that was applied for
protobuf 3.6.1 in Homebrew#29660.
That patch was removed in the upgrade of the formula
to protobuf 3.6.1.1 in Homebrew/homebrew-core@3a6b38b6,
perhaps because it was incorrectly assumed the patch
was incorporated upstream in the 3.6 branch.
@benmwebb benmwebb mentioned this pull request Nov 26, 2018
@fxcoudert fxcoudert merged commit 05ccb51 into Homebrew:master Nov 27, 2018
@fxcoudert
Copy link
Member

Thanks @benmwebb

@kkdd
Copy link
Contributor

kkdd commented Nov 27, 2018

Thank your for you elaboration.

@igas igas mentioned this pull request Dec 8, 2018
@lock lock bot added the outdated PR was locked due to age label Dec 27, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants