On Wed, 2017-11-08 at 13:59 +1100, David Gibson wrote: > On Tue, Nov 07, 2017 at 04:17:41PM +0200, Tuomas Tynkkynen wrote: > > Currently 'make install' produces a directory tree like this > > for the Python module: > > > > $PREFIX > > `-- lib > > `-- python2.7 > > `-- site-packages > > |-- _libfdt.so > > |-- libfdt-1.4.5-py2.7.egg-info > > `-- pylibfdt > > |-- libfdt.py > > `-- libfdt.pyc > > > > That is, libfdt.py is installed in an unexpected subdirectory > > pylibfdt > > so 'import libfdt' fails. Fix this by properly pointing package_dir > > to > > the root of the Python sources, producing the correct directory > > tree: > > > > $PREFIX > > `-- lib > > `-- python2.7 > > `-- site-packages > > |-- _libfdt.so > > |-- libfdt-1.4.5-py2.7.egg-info > > |-- libfdt.py > > `-- libfdt.pyc > > This doesn't seem like the right fix. Shouldn't all the files go > into > the pylibfdt subdirectory, rather than removing that subdirectory. > AFAIK you can't add that subdirectory there without breaking 'import libfdt' because the directory structure must match the module structure. I think it might be possible to achieve this though: $PREFIX `-- lib `-- python2.7 `-- site-packages |-- libfdt-1.4.5-py2.7.egg-info `-- libfdt |-- _libfdt.so |-- __init__.py `-- __init__.pyc ... but I'm not sure that's idiomatic either because now the name of the native module changes from '_libfdt' to 'libfdt._libfdt'. There are already existing similar (as in one .py + one .so) packages with the same directory structure as what I'm trying to achieve: https://packages.debian.org/sid/amd64/python-gamin/filelist -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html