levmar
levmar copied to clipboard
Fix missing _levmar package and issues with MKL
I tried to install this package, but got a few errors.
The first was that I am using MKL, and get_info
was returning an additional include_dirs kwarg. This prevented setup from running.
The next problem was an error about a missing package. The problem was that relative imports are required now for sub-packages, at least on python 3. Changes in __init__.py
fixed that.
Finally, since the package requires cython and the C file is not distributed with it, I added automatic cython-ization of the pyx
package.
Installation seems to work from a clean repo and the unit-tests pass.
I haven't tested this on other python versions, so probably to early to merge.
I'm closing this due to no activity.
@antonl Sorry, I just noticed your PR. I will take a look at it.
I tried building on Debian 9. Even with the PR code, I get:
levmar$ python setup.py build
/tmp/tmpTdH2lo/source.c:1:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] void zungqr(); ^~~~ /tmp/tmpTdH2lo/source.c: In function ‘main’: /tmp/tmpTdH2lo/source.c:4:13: warning: implicit declaration of function ‘zungqr_’ [-Wimplicit-function-declaration] zungqr_(); ^~~~~~~ /usr/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'cmdclass' warnings.warn(msg) running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/levmar copying levmar/init.py -> build/lib.linux-x86_64-2.7/levmar package init file 'levmar/tests/init.py' not found (or not a regular file) creating build/lib.linux-x86_64-2.7/levmar/tests copying levmar/tests/levmar_test.py -> build/lib.linux-x86_64-2.7/levmar/tests running build_ext building 'levmar._levmar' extension C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC
creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/levmar-2.6 creating build/temp.linux-x86_64-2.7/levmar compile options: '-DHAVE_CBLAS -Ilevmar-2.6 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c' x86_64-linux-gnu-gcc: levmar-2.6/lmbc.c x86_64-linux-gnu-gcc: levmar-2.6/lmlec.c x86_64-linux-gnu-gcc: levmar-2.6/lm.c x86_64-linux-gnu-gcc: levmar-2.6/lmblec.c x86_64-linux-gnu-gcc: levmar/_levmar.c x86_64-linux-gnu-gcc: error: levmar/_levmar.c: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. x86_64-linux-gnu-gcc: error: levmar/_levmar.c: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: Command "x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_CBLAS -Ilevmar-2.6 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c levmar/_levmar.c -o build/temp.linux-x86_64-2.7/levmar/_levmar.o" failed with exit status 1
Any help would be appreciated.