airbnb / binaryalert

BinaryAlert: Serverless, Real-time & Retroactive Malware Detection.
https://binaryalert.io
Apache License 2.0
1.4k stars 187 forks source link

Currently required PyYAML doesn't build with newer python #127

Closed sid77 closed 6 years ago

sid77 commented 6 years ago

Background

Brew somehow recently upgraded python3 to 3.7 branch and PyYAML fails to compile. Reproduce with:

% pip install -r requirements.txt
...
Building wheels for collected packages: PyYAML
...
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ext/_yaml.c -o build/temp.macosx-10.13-x86_64-3.7/ext/_yaml.o
  In file included from ext/_yaml.c:271:
  ext/_yaml.h:10:9: warning: 'PyString_CheckExact' macro redefined [-Wmacro-redefined]
  #define PyString_CheckExact PyBytes_CheckExact
          ^
  ext/_yaml.c:139:11: note: previous definition is here
    #define PyString_CheckExact          PyUnicode_CheckExact
            ^
...
    /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    51 warnings and 15 errors generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/marco/.virtualenvs/tmp-2ead4cdaa0183929/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/rwdkdb354x1_mzj29n3__7dm0000gn/T/pip-install-dda7aix9/PyYAML/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/var/folders/y1/rwdkdb354x1_mzj29n3__7dm0000gn/T/pip-record-oo4kpj90/install-record.txt --single-version-externally-managed --compile --install-headers /Users/marco/.virtualenvs/tmp-2ead4cdaa0183929/bin/../include/site/python3.7/PyYAML" failed with error code 1 in /private/var/folders/y1/rwdkdb354x1_mzj29n3__7dm0000gn/T/pip-install-dda7aix9/PyYAML/

Desired Change

This is fixed in PyYAML 3.13 🙂