Opened 12 years ago

Closed 12 years ago

#10129 closed defect (fixed)

citation.pyx: don't return false positives based on path

Reported by: John Palmieri Owned by: Jason Grout
Priority: trivial Milestone: sage-4.6.1
Component: misc Keywords:
Cc: Mike Hansen Merged in: sage-4.6.1.alpha0
Authors: John Palmieri Reviewers: Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by John Palmieri)

If you build Sage in a path containing "numpy", then get_systems in citation.pyx will think that numpy is used in every command, because it does a regular expression search for "numpy" using full pathnames. The attached patch replaces SAGE_ROOT with an empty string, to avoid such false positives.

To test, move an existing Sage installation to /tmp/numpy/sage-4.6.alpha3/, doctest citation.pyx, apply the patch and doctest again. (Other strings which will trigger a failure: scipy, _libsingular, _flint; see the full list at the top of misc/citation.pyx.)

Attachments (1)

trac_10129-get-systems.patch (942 bytes) - added by John Palmieri 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by John Palmieri

comment:1 Changed 12 years ago by John Palmieri

Description: modified (diff)
Status: newneeds_review

comment:2 Changed 12 years ago by Mike Hansen

Status: needs_reviewpositive_review

Looks good to me.

comment:3 Changed 12 years ago by Jeroen Demeyer

Cc: Mike Hansen added
Reviewers: Mike Hansen

Mike: It would be good to add your real name to the Sage Trac wiki at

comment:4 Changed 12 years ago by Jeroen Demeyer

Merged in: sage-4.6.1.alpha0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.