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

remarshal: bump PyYAML dependency version to compile with python 3.7 #33013

Closed
wants to merge 1 commit into from
Closed

remarshal: bump PyYAML dependency version to compile with python 3.7 #33013

wants to merge 1 commit into from

Conversation

mdaniel
Copy link
Contributor

@mdaniel mdaniel commented Oct 16, 2018

  • 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? (that's actually how I discovered this)
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Without this, PyYAML fails to compile on Python 3.7: yaml/pyyaml#126
@fxcoudert
Copy link
Member

fxcoudert commented Oct 16, 2018

@mdaniel can you explain what is the problem this PR is trying to fix? remarshal is building fine on macOS Sierra to Mojave.

@mdaniel
Copy link
Contributor Author

mdaniel commented Oct 17, 2018

$ brew install --build-from-source remarshal
# [...snip...]
Installing collected packages: PyYAML
  Created temporary directory: /private/tmp/pip-record-5etyjdar
  Running setup.py install for PyYAML: started
    Running command /usr/local/Cellar/remarshal/0.8.0_1/libexec/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-req-build-kuwuodp7/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-5etyjdar/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/remarshal/0.8.0_1/libexec/bin/../include/site/python3.7/PyYAML
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-3.7
    creating build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/__init__.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/composer.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/constructor.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/cyaml.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/dumper.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/emitter.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/error.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/events.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/loader.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/nodes.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/parser.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/reader.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/representer.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/resolver.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/scanner.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/serializer.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    copying lib3/yaml/tokens.py -> build/lib.macosx-10.12-x86_64-3.7/yaml
    running build_ext
    creating build/temp.macosx-10.12-x86_64-3.7
    checking if libyaml is compilable
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c build/temp.macosx-10.12-x86_64-3.7/check_libyaml.c -o build/temp.macosx-10.12-x86_64-3.7/check_libyaml.o
    checking if libyaml is linkable
    clang build/temp.macosx-10.12-x86_64-3.7/check_libyaml.o -lyaml -o build/temp.macosx-10.12-x86_64-3.7/check_libyaml
    building '_yaml' extension
    creating build/temp.macosx-10.12-x86_64-3.7/ext
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ext/_yaml.c -o build/temp.macosx-10.12-x86_64-3.7/ext/_yaml.o
    ext/_yaml.c:24143:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    ext/_yaml.c:24144:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?

and then the error messages continue verbosely from there.

Since (to the very best of my knowledge) PyYAML 3.12 is backward compatible with Python 2.7, so it won't make your coincidentally successful builds any less successful, and for sure solves a situation that exists once brew info python became 3.7. Interestingly enough, /usr/local/bin/python does actually still point to ../Cellar/python@2/2.7.15_1/bin/python but I suspect strongly the depends_on "python" in remarshal is grabbing 3.7 because of the output of brew info python.

@fxcoudert
Copy link
Member

@BrewTestBot test this please

@fxcoudert fxcoudert added the ready to merge PR can be merged once CI is green label Oct 17, 2018
@fxcoudert fxcoudert closed this in 8ecefee Oct 19, 2018
@lock lock bot added the outdated PR was locked due to age label Nov 18, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 18, 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 ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants