FabricioS / libim7

Python interface to PIV file formats from LaVision
https://launchpad.net/libim7
Other
11 stars 4 forks source link

Compiled extension not installed #2

Open FabricioS opened 6 years ago

FabricioS commented 6 years ago

According to fbl1991 in issue #1 :

But, when I have run the installation command. The _im7.so wasn't copied to the python library folder. Thus, I got the error 'OSError: dlopen(/Library/Python/2.7/site-packages/libim7/_im7.so, 6): image not found'. So I copy it manually. Could you tell me why?

On my machine, python3 setup.py install tells

running install running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "libim7._im7" sources building data_files sources build_src: building npy-pkg config files running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext customize UnixCCompiler customize UnixCCompiler using build_ext running install_lib creating /usr/local/lib/python3.6/dist-packages/libim7 copying build/lib.linux-x86_64-3.6/libim7/libim7.py -> /usr/local/lib/python3.6/dist-packages/libim7 copying build/lib.linux-x86_64-3.6/libim7/init.py -> /usr/local/lib/python3.6/dist-packages/libim7 byte-compiling /usr/local/lib/python3.6/dist-packages/libim7/libim7.py to libim7.cpython-36.pyc byte-compiling /usr/local/lib/python3.6/dist-packages/libim7/init.py to init.cpython-36.pyc running install_data creating /usr/local/lib/python3.6/dist-packages/libim7/test copying test/test_SOV2_01_1000.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_IMX.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_IMX.IM7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_PTV_B00013.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/SOV2_01_100_davis.nc -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_IMX.imx -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/SOV2_01_100_davis.txt -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/PTV_B00013.bmp -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/SOV2_01_100_davis.dat -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_SOV2_01_100.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_SOV2_01_1002.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_IMX.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/test_SOV2_01_1001.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/SOV2_01_100_davis.VC7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/libim7x.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/PTV_B00013.VC7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/ copying test/SOV2_01_100_pivmat.mat -> /usr/local/lib/python3.6/dist-packages/libim7/test/ running install_egg_info Writing /usr/local/lib/python3.6/dist-packages/libim7-0.2.egg-info running install_clib customize UnixCCompiler

It in fact does not copy the compiled extension file to the install dir.

FabricioS commented 6 years ago

By now, the setup.py script relies on the numpy.distutils.Configuration and its add_extension method. The documentation also mentions the add_installed_library which, contrary to add_extension and add_library, does install the compiled file.

Before any change, I must think again about whether it is required to use numpy distutils here (and why I did it many years ago...)