Closed simonvanderveldt closed 6 years ago
you need to build your own waf executable with the tool included. clone the waf repo and do
./waf-light --tools=cython
you need to build your own waf executable with the tool included. clone the waf repo and do ./waf-light --tools=cython
@wrl I manged to get it to work by including the waf cython tool which is part of the extra modules https://github.com/waf-project/waf/blob/master/waflib/extras/cython.py.
Which way would you prefer to fix this? Build the waf
executable which includes the cython waf tool or include the above mentioned file in the repo?
would much prefer building the waf executable.
would much prefer building the waf executable.
OK, I'll create a PR
Just tried to build this with
./waf configure --enable-python --python=/usr/local/bin/python2.7
./waf build
./waf install
but the python bindings aren't showing up in /usr/local/lib/python2.7/site-packages
, and import monome
fails. Not sure if I'm doing something wrong as I thought this issue was resolved...
I was able to build it manually by making a setup.py
file with the contents:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
ext_modules = [
Extension("monome",
sources=["monome.pyx"],
libraries=["monome"] # Unix-like specific
)
]
setup(name="Demos",
ext_modules=cythonize(ext_modules))
and invoking python setup.py build_ext --inplace
I guess this is caused by the update to waf 2.0 (or maybe waf's behaviour already changed in an earlier version).
First of all
bld.env.CYTHON
no longer gets set, no clue why yet. And when I change that so it forces building the python bindings waf errors with the following messageThere's probably a way to fix this, but I couldn't find anything useful in the waf docs. I was hoping the cython example in waf would be useful, but that has the same error :x https://github.com/waf-project/waf/issues/2047