#5060: setup.py dependency checking detects unexpected dependencies
-------------------------+--------------------------------------------------
Reporter: sbarthelemy | Owner: mabshoff
Type: defect | Status: new
Priority: major | Milestone:
Component: build | Keywords:
-------------------------+--------------------------------------------------
using sage 3.2.3, I'm trying to build a new module with a .pxd file
containing this line
{{{
#include "gmp.h"
}}}
note that the line is commented. The build fails with the following
traceback
{{{
sage -b
----------------------------------------------------------
sage: Building and installing modified Sage library files.
Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Traceback (most recent call last):
File "setup.py", line 503, in <module>
queue = compile_command_list(ext_modules, deps)
File "setup.py", line 463, in compile_command_list
dep_file, dep_time = deps.newest_dep(f)
File "setup.py", line 378, in newest_dep
for f in self.all_deps(filename):
File "setup.py", line 361, in all_deps
deps.update(self.all_deps(f, path))
File "setup.py", line 359, in all_deps
for f in self.immediate_deps(filename):
File "setup.py", line 341, in immediate_deps
self._deps[filename] = self.parse_deps(filename)
File "setup.py", line 331, in parse_deps
raise IOError, "could not find dependency %s included in %s."%(path,
filename)
IOError: could not find dependency gmp.h included in
sage/geometry/cdd.pxd.
sage: There was an error installing modified sage library code.
}}}
There is probably a problem with the regexp on line 228 of
[http://www.sagemath.org/hg/sage-main/file/b0aa7ef45b3c/setup.py
setup.py]. One can reprouce the bug with this snipet
{{{
dep_regex = re.compile(r'^ *(?:cimport +(\S+))|(?:from +(\S+)
*cimport)|(?:include *[\'"]([^\'"]+)[\'"])', re.M)
m.groups()for m in dep_regex.finditer('#include "gmp.h"'):
m.groups()
}}}
which results in
{{{
(None, None, 'gmp.h')
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5060>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---