Opened 11 years ago

Closed 10 years ago

#10129 closed defect (fixed)

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

Reported by: jhpalmieri Owned by: jason
Priority: trivial Milestone: sage-4.6.1
Component: misc Keywords:
Cc: mhansen 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 jhpalmieri)

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 jhpalmieri 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by jhpalmieri

comment:1 Changed 11 years ago by jhpalmieri

  • Description modified (diff)
  • Status changed from new to needs_review

comment:2 Changed 11 years ago by mhansen

  • Status changed from needs_review to positive_review

Looks good to me.

comment:3 Changed 10 years ago by jdemeyer

  • Cc mhansen added
  • Reviewers set to Mike Hansen

Mike: It would be good to add your real name to the Sage Trac wiki at http://trac.sagemath.org/sage_trac/

comment:4 Changed 10 years ago by jdemeyer

  • Merged in set to sage-4.6.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.