shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

Error in FindNumPy.cmake #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?
1. Use on a system that does not have NumPy

> What is the expected output? What do you see instead?
I expect the script to properly handle the case where "import numpy" fails. The 
output instead looks as follows:

CMake Error at cmake/FindNumPy.cmake:68 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:69 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:74 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:75 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:78 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:81 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:85 (string):
  string sub-command REGEX, mode MATCH regex "[0-9]*" matched an empty
  string.
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

CMake Error at cmake/FindNumPy.cmake:86 (math):
  math cannot parse the expression: "(NOTFOUND * 10000) + (NOTFOUND * 100) +
  NOTFOUND": syntax error, unexpected exp_TIMES, expecting exp_OPENPARENT or
  exp_NUMBER (11)
Call Stack (most recent call first):
  CMakeLists.txt:252 (find_package)

> What version of the product are you using? On what operating system?
I am using the attached FindNumPy.cmake script in Ubuntu 12.04. Note that it is 
slightly modified, but that these modifications should not effect said bug.

Original issue reported on code.google.com by jack.poulson@gmail.com on 19 Jun 2013 at 5:43

Attachments:

GoogleCodeExporter commented 9 years ago
Not sure what you are wanting to use numexpr without numpy.  Also, why are you 
using cmake for compiling numexpr?  numexpr is a package to be used with numpy, 
and indeed it raises an `ImportError` when using distutils for compiling the 
thing.

Original comment by fal...@gmail.com on 26 Aug 2013 at 5:42