capnproto/pycapnp

pip install pycapnp fails on macOS

pwrdwnsys opened this issue · 2 comments

As per PR #174 , it is currently not possible to pip install pycapnp on macOS. The presence of hard coded -std=c++11 overrides any alternative std CFLAGS provided by the user:

clang -DNDEBUG -g -fwrapv -O3 -Wall --std=c++14 -c /var/folders/84/1z_nk7cx3hzb7wk9q15g78_c0000gn/T/tmpak14hfyw/vers.cpp -o var/folders/84/1z_nk7cx3hzb7wk9q15g78_c0000gn/T/tmpak14hfyw/vers.o --std=c++11

In addition, the bundled version numbering is outdated. User afonso360 has a fork which contains the updated std flags and bundled version number (thank you!). For reference for anyone else stuck by this, I was able to install pycapnp on macOS inside a Python 3.7 venv using the following:

  1. pip install -U cython
  2. pip install -U setuptools
  3. git clone https://github.com/afonso360/pycapnp.git
  4. pip install --install-option '--force-cython' ./pycapnp

I was able to install pycapnp on macOS 10.14 by

  1. export MACOSX_DEPLOYMENT_TARGET=10.14
  2. CFLAGS='-stdlib=libc++' pip install pycapnp
haata commented

macOS should work without extra options now with the master branch.