Bugzilla – Bug 1200
./waf install doesn't install Python bindings properly
Last modified: 2011-07-12 06:03:01 UTC
Currently doing ./waf install doesn't install Python bindings properly, *.so files get copied into /usr/lib instead of copying contents of build/release/bindings/python to /usr/lib64/python2.X/site-packages/ (or dist-packages or something similar).
Created attachment 1175 [details] Non-working attempt at making a patch
changeset: 7348:9372b57a6ce4 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Tue Jul 05 19:16:47 2011 +0100 summary: Bug 1200 - ./waf install doesn't install Python bindings properly
It works much better now, but still not perfect. Namely, regardless of libdir setting, Python bindings get installed into {prefix}/lib/python2.7/site-packages. Fedora puts all Python bindings that have arch-dependant .so files under lib64.
I think I know how to fix it.
Great.
I think this should fix it; please test, reopen if not fixed. changeset: 7363:0f96f5beb8c7 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Mon Jul 11 14:24:59 2011 +0100 summary: Bug 1200 - ./waf install doesn't install Python bindings properly
They still get installed into lib instead of lib64. I'm using ./waf configure --prefix=/usr --libdir /usr/lib64 and Python bindings get installed into /usr/lib/python2.7/site-packages/ns As before, that works, but it will not be acceptable for RPM package. Couldn't sys.path help somehow?
Could you please test this change and see if it helps? Basically, just add the parameter plat_specific=1 to the get_python_lib() call... diff -r 0f96f5beb8c7 bindings/python/wscript --- a/bindings/python/wscript Mon Jul 11 14:24:59 2011 +0100 +++ b/bindings/python/wscript Mon Jul 11 18:20:50 2011 +0100 @@ -121,7 +121,7 @@ pydir = conf.environ['PYTHONDIR'] else: (pydir,) = _get_python_variables(conf.env['PYTHON'], - ["get_python_lib(standard_lib=0, prefix=%r)" % conf.env['PREFIX']], + ["get_python_lib(plat_specific=1, standard_lib=0, prefix=%r)" % conf.env['PREFIX']], ['from distutils.sysconfig import get_python_lib']) if hasattr(conf, 'define'): # conf.define is added by the C tool, so may not exist conf.define('PYTHONDIR', pydir)
Yes, this one works.
changeset: 7364:80940903b711 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Tue Jul 12 11:02:40 2011 +0100 summary: Bug 1200 again: fix pyext install path on fedora x86_64