only enable cycache if DOT_SAGE exists
Trac #15430: Enable cython caching

The entire Sage library fits into about 25MB (compressed) cache.

URL: http://trac.sagemath.org/15430
Reported by: robertwb
Ticket author(s): Robert Bradshaw
Reviewer(s): Volker Braun
Trac #15420: Borken git doctests.

Github master, at 094712a285895ceac4c1521fb04cc9cc343a4b3a (head)

http://patchbot.sagemath.org/log/0/Ubuntu/12.10/x86_64/3.5.0-17-generic/
pi/2013-11-14%2002:54:22%20-0800?short

Looks like we just need to sort this list.

URL: http://trac.sagemath.org/15420
Reported by: robertwb
Ticket author(s): Robert Bradshaw, R. Andrew Ohana
Reviewer(s): R. Andrew Ohana
Trac #15401: Build git without gettext if necessary, spkg-check sanity

The git spkg fails to build if gettext is not installed, see
https://groups.google.com/d/msg/sage-devel/RAWInaDhz5c/lQYXrKQ4aXEJ

We should try again without gettext if necessary.

Also, clean up spkg-install/spkg-check.

URL: http://trac.sagemath.org/15401
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s):
Trac #12627: The spkg/bin/sage script engraves paths to executables

There is no need to make full paths explicit - it is even an hindrance
when one moves things around.

Since sage-env already sets PATH correctly, let's just use that.

The use of 'command' to test for the presence of an executable in the
path is portable, as documented in this
[http://stackoverflow.com/questions/592620/check-if-a-program-exists-
from-a-bash-script stackoverflow question].

URL: http://trac.sagemath.org/12627
Reported by: Snark
Ticket author(s): Julien Puydt, Volker Braun
Reviewer(s): R. Andrew Ohana
Trac #15440: Random spaces injected into Maxima pexpect output

Sometimes doctests fail because randomly spaces are injected into Maxima
output. For example:
{{{
sage -t --long src/sage/schemes/affine/affine_morphism.py
**********************************************************************
File "src/sage/schemes/affine/affine_morphism.py", line 208, in sage.sch
emes.affine.affine_morphism.SchemeMorphism_polynomial_affine_space.homog
enize
Failed example:
    f.homogenize(0,'z')
Exception raised:
    Traceback (most recent call last):
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 480, in _run
        self.execute(example, compiled, test.globs)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 839, in execute
        exec compiled in globs
      File "<doctest sage.schemes.affine.affine_morphism.SchemeMorphism_
polynomial_affine_space.homogenize[17]>", line 1, in <module>
        f.homogenize(Integer(0),'z')
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/schemes/affine/affine_morphism.py", line 230, in
homogenize
        F=[S(((self[i]*l).numerator())._maxima_().divide(self[i].denomin
ator())[0].sage()) for i in range(N)]
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 588, in __call__
        return self._obj.parent().function_call(self._name, [self._obj]
+ list(args), kwds)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 484, in function_call
        args, kwds = self._convert_args_kwds(args, kwds)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 445, in
_convert_args_kwds
        args[i] = self(arg)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 201, in __call__
        return self._coerce_from_special_method(x)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 227, in
_coerce_from_special_method
        return (x.__getattribute__(s))(self)
      File "sage_object.pyx", line 603, in
sage.structure.sage_object.SageObject._maxima_
(sage/structure/sage_object.c:6332)
      File "sage_object.pyx", line 515, in
sage.structure.sage_object.SageObject._interface_
(sage/structure/sage_object.c:4376)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 199, in __call__
        return cls(self, x, name=name)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/maxima.py", line 1156, in __init__
        ExpectElement.__init__(self, parent, value, is_name=False,
name=None)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/expect.py", line 1291, in __init__
        self._name = parent._create(value, name=name)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 389, in _create
        self.set(name, value)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/maxima.py", line 1001, in set
        self._eval_line(cmd)
      File
"/home/buildbot/build/sage/eno-1/sage_git/build/local/lib/python2.7
/site-packages/sage/interfaces/maxima.py", line 757, in _eval_line
        assert line_echo.strip() == line.strip(), 'mismatch:\n' +
line_echo + line
    AssertionError: mismatch:
    sa ge9 : y$

    sage9 : y$
**********************************************************************
1 item had failures:
   1 of  19 in sage.schemes.affine.affine_morphism.SchemeMorphism_polyno
mial_affine_space.homogenize
}}}
This involves a race of some sort since the position is random and it
mainly occurs on slower machines (e.g. Skynet, I've never seen it on a
Core i7). The exact cause is unknown.

URL: http://trac.sagemath.org/15440
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s):
Trac #15458: "make distclean" fails on Solaris

From the "make disclean" output:
{{{
find -name '*.pyc' | xargs rm -f
find: illegal option -- n
find: [-H | -L] path-list predicate-list
find -name '*.pyx' | sed 's/pyx$/c/' | xargs rm -f
find: illegal option -- n
find: [-H | -L] path-list predicate-list
find -name '*.pyx' | sed 's/pyx$/cpp/' | xargs rm -f
find: illegal option -- n
find: [-H | -L] path-list predicate-list
}}}

URL: http://trac.sagemath.org/15458
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s):
Trac #15457: sage-cleaner does not quit

If there are files in `DOT_SAGE/temp/HOSTNAME` then the sage cleaner
process never stops. Note that Sage temp files must(!) be under
`DOT_SAGE/temp/HOSTNAME/<pid>`.

URL: http://trac.sagemath.org/15457
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s):