Volker Braun avatar Volker Braun committed 389592f

python 2.7.5

Comments (0)

Files changed (5)

+trac_12728_5.10.beta3.patch
+trac_14574-folded.patch
+trac_14600_lowercase_FLINT.patch
 trac_13213-quadratic_field_comparison.patch
 trac_14587_m2.patch
 trac_14587_doctests.patch
 trac_13084_ppl_lattice_polygon.patch
 trac_13084_toric_weierstrass.patch
 trac_13458_toric_Weierstrass_covering.patch
+trac_3416_elliptic_curve_from_cubic_vb.patch
+trac_3416_jacobians.patch
+trac_3416_fixes.patch
 ppl_reflexive_polytope.patch
 debug_memory_leak.patch
 trac_14469_repr_graphics.patch
 trac_12900_Demazure_roots.patch
 trac_xxxx_fiber_divisor_graph.patch
 trac_14357_lazy_everywhere.patch
-trac_3416_elliptic_curve_from_cubic_vb.patch
-trac_3416_jacobians.patch
-trac_3416_fixes.patch
 trac_14015_affine_group.patch
 trac_x_matrix_groups.patch
 trac_xxxx_fan_refinement.patch

trac_12728_5.10.beta3.patch

+# HG changeset patch
+# User Julien Puydt <julien.puydt@laposte.net>
+# Date 1368864544 -7200
+# Node ID 2c99ac8a793e7b348a8f87441a3edac35818188c
+# Parent  5bca9e04c7a85a2498718244157b457f5e9d540b
+Trac #12728: Sanitize include paths
+
+diff --git a/sage/algebras/letterplace/free_algebra_element_letterplace.pxd b/sage/algebras/letterplace/free_algebra_element_letterplace.pxd
+--- a/sage/algebras/letterplace/free_algebra_element_letterplace.pxd
++++ b/sage/algebras/letterplace/free_algebra_element_letterplace.pxd
+@@ -12,7 +12,7 @@
+ from sage.structure.element cimport AlgebraElement, ModuleElement, RingElement, Element
+ from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_libsingular, MPolynomial_libsingular
+ from sage.algebras.letterplace.free_algebra_letterplace cimport FreeAlgebra_letterplace
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
+     cdef MPolynomial_libsingular _poly
+diff --git a/sage/algebras/letterplace/free_algebra_letterplace.pxd b/sage/algebras/letterplace/free_algebra_letterplace.pxd
+--- a/sage/algebras/letterplace/free_algebra_letterplace.pxd
++++ b/sage/algebras/letterplace/free_algebra_letterplace.pxd
+@@ -14,7 +14,7 @@
+ from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_libsingular, MPolynomial_libsingular
+ from sage.algebras.letterplace.free_algebra_element_letterplace cimport FreeAlgebraElement_letterplace
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cdef class FreeAlgebra_letterplace(Algebra):
+     cdef MPolynomialRing_libsingular _commutative_ring
+diff --git a/sage/algebras/quatalg/quaternion_algebra_cython.pyx b/sage/algebras/quatalg/quaternion_algebra_cython.pyx
+--- a/sage/algebras/quatalg/quaternion_algebra_cython.pyx
++++ b/sage/algebras/quatalg/quaternion_algebra_cython.pyx
+@@ -26,7 +26,7 @@
+ ########################################################################
+ 
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ from sage.rings.integer_ring import ZZ
+ from sage.rings.rational_field import QQ
+diff --git a/sage/algebras/quatalg/quaternion_algebra_element.pxd b/sage/algebras/quatalg/quaternion_algebra_element.pxd
+--- a/sage/algebras/quatalg/quaternion_algebra_element.pxd
++++ b/sage/algebras/quatalg/quaternion_algebra_element.pxd
+@@ -1,6 +1,6 @@
+-include "../../ext/cdefs.pxi"
+-include "../../libs/flint/fmpz.pxi"
+-include "../../libs/flint/fmpz_poly.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/libs/flint/fmpz.pxi"
++include "sage/libs/flint/fmpz_poly.pxi"
+ 
+ import sage.structure.element
+ cimport sage.structure.element
+diff --git a/sage/algebras/quatalg/quaternion_algebra_element.pyx b/sage/algebras/quatalg/quaternion_algebra_element.pyx
+--- a/sage/algebras/quatalg/quaternion_algebra_element.pyx
++++ b/sage/algebras/quatalg/quaternion_algebra_element.pyx
+@@ -33,12 +33,12 @@
+ from sage.rings.all import PolynomialRing
+ from sage.matrix.all import matrix
+ 
+-include "../../ext/gmp.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/gmp.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+-include "../../libs/flint/fmpz.pxi"
+-include "../../libs/flint/fmpz_poly.pxi"
+-include "../../libs/flint/ntl_interface.pxd"
++include "sage/libs/flint/fmpz.pxi"
++include "sage/libs/flint/fmpz_poly.pxi"
++include "sage/libs/flint/ntl_interface.pxd"
+ 
+ # variables for holding temporary values computed in
+ # QuaternionAlgebraElement_rational_field._mul_()
+diff --git a/sage/calculus/riemann.pyx b/sage/calculus/riemann.pyx
+--- a/sage/calculus/riemann.pyx
++++ b/sage/calculus/riemann.pyx
+@@ -25,8 +25,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ from sage.plot.primitive import GraphicPrimitive
+ from sage.misc.decorators import options
+diff --git a/sage/categories/action.pyx b/sage/categories/action.pyx
+--- a/sage/categories/action.pyx
++++ b/sage/categories/action.pyx
+@@ -68,7 +68,7 @@
+ import sage.structure.element
+ from weakref import ref
+ 
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cdef inline category(x):
+     try:
+diff --git a/sage/categories/map.pyx b/sage/categories/map.pyx
+--- a/sage/categories/map.pyx
++++ b/sage/categories/map.pyx
+@@ -16,7 +16,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ import homset
+ from sage.structure.parent cimport Set_PythonType
+diff --git a/sage/categories/morphism.pyx b/sage/categories/morphism.pyx
+--- a/sage/categories/morphism.pyx
++++ b/sage/categories/morphism.pyx
+@@ -25,7 +25,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ from cpython.object cimport *
+ 
+ 
+@@ -33,7 +33,7 @@
+ 
+ import homset
+ 
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ from sage.structure.element cimport Element
+ 
+ def make_morphism(_class, parent, _dict, _slots):
+diff --git a/sage/coding/binary_code.pxd b/sage/coding/binary_code.pxd
+--- a/sage/coding/binary_code.pxd
++++ b/sage/coding/binary_code.pxd
+@@ -1,5 +1,5 @@
+ 
+-include '../ext/cdefs.pxi'
++include 'sage/ext/cdefs.pxi'
+ 
+ cdef int *hamming_weights()
+ 
+diff --git a/sage/coding/binary_code.pyx b/sage/coding/binary_code.pyx
+--- a/sage/coding/binary_code.pyx
++++ b/sage/coding/binary_code.pyx
+@@ -31,10 +31,10 @@
+ #                         http://www.gnu.org/licenses/
+ #*******************************************************************************
+ 
+-include '../ext/cdefs.pxi'
++include 'sage/ext/cdefs.pxi'
+ from cpython.mem cimport *
+-include '../ext/stdsage.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/interrupt.pxi'
+ from sage.structure.element import is_Matrix
+ from sage.misc.misc import cputime
+ from sage.rings.integer cimport Integer
+@@ -73,8 +73,8 @@
+         ham_wts[i] = ham_wts[i & 255] + ham_wts[(i>>8) & 255]
+     return ham_wts
+ 
+-include '../misc/bitset_pxd.pxi'
+-include '../misc/bitset.pxi'
++include 'sage/misc/bitset_pxd.pxi'
++include 'sage/misc/bitset.pxi'
+ def weight_dist(M):
+     """
+     Computes the weight distribution of the row space of M.
+diff --git a/sage/combinat/combinat_cython.pyx b/sage/combinat/combinat_cython.pyx
+--- a/sage/combinat/combinat_cython.pyx
++++ b/sage/combinat/combinat_cython.pyx
+@@ -9,7 +9,7 @@
+ 
+ """
+ 
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ 
+ from sage.libs.gmp.all cimport *
+diff --git a/sage/combinat/debruijn_sequence.pxd b/sage/combinat/debruijn_sequence.pxd
+--- a/sage/combinat/debruijn_sequence.pxd
++++ b/sage/combinat/debruijn_sequence.pxd
+@@ -1,1 +1,1 @@
+-include "../misc/bitset_pxd.pxi"
++include "sage/misc/bitset_pxd.pxi"
+diff --git a/sage/combinat/debruijn_sequence.pyx b/sage/combinat/debruijn_sequence.pyx
+--- a/sage/combinat/debruijn_sequence.pyx
++++ b/sage/combinat/debruijn_sequence.pyx
+@@ -65,7 +65,7 @@
+ #                         http://www.gnu.org/licenses/
+ #*******************************************************************************
+ 
+-include "../misc/bitset.pxi"
++include "sage/misc/bitset.pxi"
+ 
+ def debruijn_sequence(int k, int n):
+     """
+diff --git a/sage/combinat/degree_sequences.pyx b/sage/combinat/degree_sequences.pyx
+--- a/sage/combinat/degree_sequences.pyx
++++ b/sage/combinat/degree_sequences.pyx
+@@ -262,9 +262,9 @@
+ from sage.libs.gmp.all cimport mpz_t
+ from sage.libs.gmp.all cimport *
+ from sage.rings.integer cimport Integer
+-include '../ext/stdsage.pxi'
+-include '../ext/cdefs.pxi'
+-include "../ext/interrupt.pxi"
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include "sage/ext/interrupt.pxi"
+ 
+ 
+ cdef unsigned char * seq
+diff --git a/sage/combinat/expnums.pyx b/sage/combinat/expnums.pyx
+--- a/sage/combinat/expnums.pyx
++++ b/sage/combinat/expnums.pyx
+@@ -6,10 +6,10 @@
+ - Nick Alexander
+ """
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
+-include "../ext/cdefs.pxi"
+-include "../ext/gmp.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/gmp.pxi"
+ 
+ from sage.rings.integer cimport Integer
+ 
+diff --git a/sage/combinat/matrices/dancing_links.pyx b/sage/combinat/matrices/dancing_links.pyx
+--- a/sage/combinat/matrices/dancing_links.pyx
++++ b/sage/combinat/matrices/dancing_links.pyx
+@@ -21,7 +21,7 @@
+ import sys
+ 
+ from cpython.list cimport *
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ from cpython.int cimport *
+ from cpython.ref cimport *
+ 
+diff --git a/sage/combinat/partitions.pyx b/sage/combinat/partitions.pyx
+--- a/sage/combinat/partitions.pyx
++++ b/sage/combinat/partitions.pyx
+@@ -18,7 +18,7 @@
+ 
+ #from libc.stdlib cimport malloc, free
+ 
+-include "../ext/interrupt.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ from sage.rings.integer cimport Integer
+ 
+diff --git a/sage/combinat/permutation_cython.pyx b/sage/combinat/permutation_cython.pyx
+--- a/sage/combinat/permutation_cython.pyx
++++ b/sage/combinat/permutation_cython.pyx
+@@ -26,8 +26,8 @@
+ 
+ """
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ from cpython.list cimport *
+ 
+ ##########################################################
+diff --git a/sage/ext/c_lib.pyx b/sage/ext/c_lib.pyx
+--- a/sage/ext/c_lib.pyx
++++ b/sage/ext/c_lib.pyx
+@@ -19,8 +19,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include '../ext/stdsage.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ def _init_csage():
+     """
+diff --git a/sage/ext/gen_interpreters.py b/sage/ext/gen_interpreters.py
+--- a/sage/ext/gen_interpreters.py
++++ b/sage/ext/gen_interpreters.py
+@@ -3241,7 +3241,7 @@
+         w(je("""
+ # Automatically generated by ext/gen_interpreters.py.  Do not edit!
+ 
+-include "../stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ from cpython cimport PyObject
+ cdef extern from "Python.h":
+     void Py_DECREF(PyObject *o)
+@@ -3611,7 +3611,7 @@
+ 
+             sage: print rdf_wrapper
+             # Automatically generated by ext/gen_interpreters.py.  Do not edit!
+-            include "../stdsage.pxi"
++            include "sage/ext/stdsage.pxi"
+             from cpython cimport PyObject
+             cdef extern from "Python.h":
+                 void Py_DECREF(PyObject *o)
+diff --git a/sage/ext/gmp.pxi b/sage/ext/gmp.pxi
+--- a/sage/ext/gmp.pxi
++++ b/sage/ext/gmp.pxi
+@@ -9,7 +9,7 @@
+ #
+ # to include this in a file.
+ 
+-include '../ext/interrupt.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ cimport libc.stdlib
+ from cpython.mem cimport *
+diff --git a/sage/ext/multi_modular.pxd b/sage/ext/multi_modular.pxd
+--- a/sage/ext/multi_modular.pxd
++++ b/sage/ext/multi_modular.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.rings.integer import Integer
+ from sage.rings.integer cimport Integer
+diff --git a/sage/ext/multi_modular.pyx b/sage/ext/multi_modular.pyx
+--- a/sage/ext/multi_modular.pyx
++++ b/sage/ext/multi_modular.pyx
+@@ -12,9 +12,9 @@
+ ######################################################################
+ 
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
+-include "../ext/gmp.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/gmp.pxi"
+ 
+ 
+ from sage.rings.integer_ring import ZZ
+diff --git a/sage/finance/time_series.pyx b/sage/finance/time_series.pyx
+--- a/sage/finance/time_series.pyx
++++ b/sage/finance/time_series.pyx
+@@ -36,10 +36,10 @@
+ - William Stein
+ """
+ 
+-include "../ext/cdefs.pxi"
+-include "../ext/stdsage.pxi"
+-include "../ext/random.pxi"
+-include "../ext/python_slice.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/random.pxi"
++include "sage/ext/python_slice.pxi"
+ from cpython.string cimport *
+ 
+ cdef extern from "math.h":
+diff --git a/sage/functions/prime_pi.pyx b/sage/functions/prime_pi.pyx
+--- a/sage/functions/prime_pi.pyx
++++ b/sage/functions/prime_pi.pyx
+@@ -22,9 +22,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi' 
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi' 
++include 'sage/ext/interrupt.pxi'
+ 
+ from sage.rings.integer import Integer
+ from sage.rings.fast_arith import prime_range
+diff --git a/sage/geometry/toric_lattice_element.pyx b/sage/geometry/toric_lattice_element.pyx
+--- a/sage/geometry/toric_lattice_element.pyx
++++ b/sage/geometry/toric_lattice_element.pyx
+@@ -95,8 +95,8 @@
+ #*****************************************************************************
+ 
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi' # Needed for PY_NEW
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi' # Needed for PY_NEW
+ 
+ from sage.geometry.toric_plotter import ToricPlotter
+ from sage.modules.vector_integer_dense cimport Vector_integer_dense
+diff --git a/sage/graphs/base/c_graph.pxd b/sage/graphs/base/c_graph.pxd
+--- a/sage/graphs/base/c_graph.pxd
++++ b/sage/graphs/base/c_graph.pxd
+@@ -5,7 +5,7 @@
+ #                         http://www.gnu.org/licenses/
+ #**************************************************************************
+ 
+-include "../../misc/bitset_pxd.pxi"
++include "sage/misc/bitset_pxd.pxi"
+ 
+ cdef class CGraph:
+     cdef int num_verts
+diff --git a/sage/graphs/base/c_graph.pyx b/sage/graphs/base/c_graph.pyx
+--- a/sage/graphs/base/c_graph.pyx
++++ b/sage/graphs/base/c_graph.pyx
+@@ -37,7 +37,7 @@
+ #                         http://www.gnu.org/licenses/
+ #**************************************************************************
+ 
+-include "../../misc/bitset.pxi"
++include "sage/misc/bitset.pxi"
+ 
+ from graph_backends import GenericGraphBackend
+ from sage.rings.integer cimport Integer
+diff --git a/sage/graphs/base/dense_graph.pxd b/sage/graphs/base/dense_graph.pxd
+--- a/sage/graphs/base/dense_graph.pxd
++++ b/sage/graphs/base/dense_graph.pxd
+@@ -7,8 +7,8 @@
+ #*******************************************************************************
+ 
+ from c_graph cimport CGraph
+-include '../../ext/stdsage.pxi'
+-include '../../misc/bitset_pxd.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/misc/bitset_pxd.pxi'
+ 
+ cdef class DenseGraph(CGraph):
+     # Values inherited from CGraph:
+diff --git a/sage/graphs/base/dense_graph.pyx b/sage/graphs/base/dense_graph.pyx
+--- a/sage/graphs/base/dense_graph.pyx
++++ b/sage/graphs/base/dense_graph.pyx
+@@ -120,7 +120,7 @@
+ #                         http://www.gnu.org/licenses/
+ #*******************************************************************************
+ 
+-include '../../misc/bitset.pxi'
++include 'sage/misc/bitset.pxi'
+ 
+ cdef class DenseGraph(CGraph):
+     """
+diff --git a/sage/graphs/base/sparse_graph.pxd b/sage/graphs/base/sparse_graph.pxd
+--- a/sage/graphs/base/sparse_graph.pxd
++++ b/sage/graphs/base/sparse_graph.pxd
+@@ -7,8 +7,8 @@
+ #*******************************************************************************
+ 
+ from c_graph cimport CGraph
+-include '../../ext/stdsage.pxi'
+-include '../../misc/bitset_pxd.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/misc/bitset_pxd.pxi'
+ 
+ cdef struct SparseGraphLLNode:
+     int label
+diff --git a/sage/graphs/base/sparse_graph.pyx b/sage/graphs/base/sparse_graph.pyx
+--- a/sage/graphs/base/sparse_graph.pyx
++++ b/sage/graphs/base/sparse_graph.pyx
+@@ -189,7 +189,7 @@
+ #                         http://www.gnu.org/licenses/
+ #*******************************************************************************
+ 
+-include '../../misc/bitset.pxi'
++include 'sage/misc/bitset.pxi'
+ 
+ cdef enum:
+     BT_REORDERING_CONSTANT = 145533211
+diff --git a/sage/graphs/base/static_sparse_graph.pxd b/sage/graphs/base/static_sparse_graph.pxd
+--- a/sage/graphs/base/static_sparse_graph.pxd
++++ b/sage/graphs/base/static_sparse_graph.pxd
+@@ -1,6 +1,6 @@
+ ctypedef unsigned short ushort 
+ 
+-include "../../misc/bitset_pxd.pxi"
++include "sage/misc/bitset_pxd.pxi"
+ 
+ ctypedef struct short_digraph_s:
+    ushort n
+diff --git a/sage/graphs/base/static_sparse_graph.pyx b/sage/graphs/base/static_sparse_graph.pyx
+--- a/sage/graphs/base/static_sparse_graph.pyx
++++ b/sage/graphs/base/static_sparse_graph.pyx
+@@ -159,7 +159,7 @@
+ with C arguments).
+ """
+ 
+-include "../../misc/bitset.pxi"
++include "sage/misc/bitset.pxi"
+ 
+ ##############################################################################
+ #       Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com>
+diff --git a/sage/graphs/chrompoly.pyx b/sage/graphs/chrompoly.pyx
+--- a/sage/graphs/chrompoly.pyx
++++ b/sage/graphs/chrompoly.pyx
+@@ -20,9 +20,9 @@
+ from sage.rings.integer_ring import ZZ
+ from sage.rings.integer cimport Integer
+ from sage.misc.misc import prod
+-include '../ext/interrupt.pxi'
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi'
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ def chromatic_polynomial(G, return_tree_basis = False):
+     """
+diff --git a/sage/graphs/cliquer.pyx b/sage/graphs/cliquer.pyx
+--- a/sage/graphs/cliquer.pyx
++++ b/sage/graphs/cliquer.pyx
+@@ -33,8 +33,8 @@
+ #*****************************************************************************
+ 
+ 
+-include "../ext/interrupt.pxi"
+-include '../ext/stdsage.pxi'
++include "sage/ext/interrupt.pxi"
++include 'sage/ext/stdsage.pxi'
+ 
+ def max_clique(graph):
+     """
+diff --git a/sage/graphs/comparability.pyx b/sage/graphs/comparability.pyx
+--- a/sage/graphs/comparability.pyx
++++ b/sage/graphs/comparability.pyx
+@@ -207,7 +207,7 @@
+ #                         http://www.gnu.org/licenses/                         #
+ ################################################################################
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ #####################
+ # Greedy Algorithms #
+ #####################
+diff --git a/sage/graphs/convexity_properties.pxd b/sage/graphs/convexity_properties.pxd
+--- a/sage/graphs/convexity_properties.pxd
++++ b/sage/graphs/convexity_properties.pxd
+@@ -1,4 +1,4 @@
+-include "../misc/bitset_pxd.pxi"
++include "sage/misc/bitset_pxd.pxi"
+ 
+ cdef class ConvexityProperties:
+     cdef int _n
+diff --git a/sage/graphs/convexity_properties.pyx b/sage/graphs/convexity_properties.pyx
+--- a/sage/graphs/convexity_properties.pyx
++++ b/sage/graphs/convexity_properties.pyx
+@@ -30,7 +30,7 @@
+ #                  http://www.gnu.org/licenses/
+ ##############################################################################
+ 
+-include "../misc/bitset.pxi"
++include "sage/misc/bitset.pxi"
+ from sage.numerical.backends.generic_backend cimport GenericBackend
+ from sage.numerical.backends.generic_backend import get_solver
+ 
+diff --git a/sage/graphs/distances_all_pairs.pyx b/sage/graphs/distances_all_pairs.pyx
+--- a/sage/graphs/distances_all_pairs.pyx
++++ b/sage/graphs/distances_all_pairs.pyx
+@@ -127,8 +127,8 @@
+ #                  http://www.gnu.org/licenses/
+ ##############################################################################
+ 
+-include "../misc/bitset_pxd.pxi"
+-include "../misc/bitset.pxi"
++include "sage/misc/bitset_pxd.pxi"
++include "sage/misc/bitset.pxi"
+ from libc.stdint cimport uint64_t
+ from sage.graphs.base.c_graph cimport CGraph
+ from sage.graphs.base.c_graph cimport vertex_label
+diff --git a/sage/graphs/generic_graph_pyx.pyx b/sage/graphs/generic_graph_pyx.pyx
+--- a/sage/graphs/generic_graph_pyx.pyx
++++ b/sage/graphs/generic_graph_pyx.pyx
+@@ -15,9 +15,9 @@
+ #                         http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../ext/interrupt.pxi"
+-include '../ext/cdefs.pxi'            
+-include '../ext/stdsage.pxi'
++include "sage/ext/interrupt.pxi"
++include 'sage/ext/cdefs.pxi'            
++include 'sage/ext/stdsage.pxi'
+ 
+ # import from Python standard library
+ from sage.misc.prandom import random
+diff --git a/sage/graphs/genus.pyx b/sage/graphs/genus.pyx
+--- a/sage/graphs/genus.pyx
++++ b/sage/graphs/genus.pyx
+@@ -42,9 +42,9 @@
+ from sage.graphs.graph import Graph
+ 
+ 
+-include "../ext/stdsage.pxi" 
+-include "../ext/cdefs.pxi" 
+-include "../ext/interrupt.pxi" 
++include "sage/ext/stdsage.pxi" 
++include "sage/ext/cdefs.pxi" 
++include "sage/ext/interrupt.pxi" 
+ 
+ 
+ cdef inline int edge_map(int i):
+diff --git a/sage/graphs/graph_decompositions/fast_digraph.pyx b/sage/graphs/graph_decompositions/fast_digraph.pyx
+--- a/sage/graphs/graph_decompositions/fast_digraph.pyx
++++ b/sage/graphs/graph_decompositions/fast_digraph.pyx
+@@ -13,9 +13,9 @@
+ set if element i belongs to the set.
+ """
+ 
+-include '../../ext/stdsage.pxi'
+-include '../../ext/cdefs.pxi'
+-include '../../ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ from libc.stdint cimport uint8_t
+ 
+diff --git a/sage/graphs/graph_decompositions/rankwidth.pyx b/sage/graphs/graph_decompositions/rankwidth.pyx
+--- a/sage/graphs/graph_decompositions/rankwidth.pyx
++++ b/sage/graphs/graph_decompositions/rankwidth.pyx
+@@ -123,9 +123,9 @@
+ #*****************************************************************************
+ 
+ 
+-include '../../ext/stdsage.pxi'
+-include '../../misc/bitset_pxd.pxi'
+-include "../../ext/interrupt.pxi"
++include 'sage/ext/stdsage.pxi'
++include 'sage/misc/bitset_pxd.pxi'
++include "sage/ext/interrupt.pxi"
+ 
+ cdef list id_to_vertices
+ cdef dict vertices_to_id
+diff --git a/sage/graphs/graph_decompositions/vertex_separation.pyx b/sage/graphs/graph_decompositions/vertex_separation.pyx
+--- a/sage/graphs/graph_decompositions/vertex_separation.pyx
++++ b/sage/graphs/graph_decompositions/vertex_separation.pyx
+@@ -195,9 +195,9 @@
+ -------
+ """
+ 
+-include '../../ext/stdsage.pxi'
+-include '../../ext/cdefs.pxi'
+-include '../../ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include 'fast_digraph.pyx'
+ from libc.stdint cimport uint8_t, int8_t
+ 
+diff --git a/sage/graphs/hyperbolicity.pyx b/sage/graphs/hyperbolicity.pyx
+--- a/sage/graphs/hyperbolicity.pyx
++++ b/sage/graphs/hyperbolicity.pyx
+@@ -141,7 +141,7 @@
+ from sage.functions.other import floor
+ from sage.misc.bitset import Bitset
+ from libc.stdint cimport uint16_t, uint32_t, uint64_t
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ 
+ # Defining a pair of vertices as a C struct
+diff --git a/sage/graphs/matchpoly.pyx b/sage/graphs/matchpoly.pyx
+--- a/sage/graphs/matchpoly.pyx
++++ b/sage/graphs/matchpoly.pyx
+@@ -34,11 +34,11 @@
+ from sage.rings.integer_ring import ZZ
+ from sage.rings.integer cimport Integer
+ from sage.misc.misc import prod
+-include '../ext/interrupt.pxi'
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi'
+-include '../libs/flint/fmpz.pxi'
+-include '../libs/flint/fmpz_poly.pxi'
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/libs/flint/fmpz.pxi'
++include 'sage/libs/flint/fmpz_poly.pxi'
+ 
+ R = ZZ['x']
+ x = R.gen()
+diff --git a/sage/graphs/modular_decomposition/modular_decomposition.pxd b/sage/graphs/modular_decomposition/modular_decomposition.pxd
+--- a/sage/graphs/modular_decomposition/modular_decomposition.pxd
++++ b/sage/graphs/modular_decomposition/modular_decomposition.pxd
+@@ -1,6 +1,6 @@
+-include "../../ext/interrupt.pxi" 
+-include '../../ext/cdefs.pxi'             
+-include '../../ext/stdsage.pxi' 
++include "sage/ext/interrupt.pxi" 
++include 'sage/ext/cdefs.pxi'             
++include 'sage/ext/stdsage.pxi' 
+ 
+ 
+ 
+diff --git a/sage/graphs/spanning_tree.pyx b/sage/graphs/spanning_tree.pyx
+--- a/sage/graphs/spanning_tree.pyx
++++ b/sage/graphs/spanning_tree.pyx
+@@ -61,9 +61,9 @@
+ # http://www.gnu.org/licenses/
+ ###########################################################################
+ 
+-include "../ext/cdefs.pxi"
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cpdef kruskal(G, wfunction=None, bint check=False):
+     r"""
+diff --git a/sage/graphs/trees.pyx b/sage/graphs/trees.pyx
+--- a/sage/graphs/trees.pyx
++++ b/sage/graphs/trees.pyx
+@@ -18,7 +18,7 @@
+ cdef extern from "limits.h":
+     cdef int INT_MAX
+ 
+-include "../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ # from networkx import MultiGraph
+ 
+diff --git a/sage/graphs/weakly_chordal.pyx b/sage/graphs/weakly_chordal.pyx
+--- a/sage/graphs/weakly_chordal.pyx
++++ b/sage/graphs/weakly_chordal.pyx
+@@ -39,8 +39,8 @@
+ #                  http://www.gnu.org/licenses/
+ ##############################################################################
+ 
+-include "../misc/bitset_pxd.pxi"
+-include "../misc/bitset.pxi"
++include "sage/misc/bitset_pxd.pxi"
++include "sage/misc/bitset.pxi"
+ 
+ cdef inline int has_edge(bitset_t bs, int u, int v, int n):
+     return bitset_in(bs, u*n+v)
+diff --git a/sage/groups/perm_gps/permgroup_element.pyx b/sage/groups/perm_gps/permgroup_element.pyx
+--- a/sage/groups/perm_gps/permgroup_element.pyx
++++ b/sage/groups/perm_gps/permgroup_element.pyx
+@@ -58,8 +58,8 @@
+ 
+ import sage.groups.old as group
+ 
+-include "../../ext/stdsage.pxi"
+-include "../../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
+ from cpython.list cimport *
+ 
+ from sage.rings.all      import ZZ, Integer, is_MPolynomial, is_Polynomial
+diff --git a/sage/gsl/callback.pyx b/sage/gsl/callback.pyx
+--- a/sage/gsl/callback.pyx
++++ b/sage/gsl/callback.pyx
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ include 'gsl.pxi'
+ 
+diff --git a/sage/gsl/dwt.pxd b/sage/gsl/dwt.pxd
+--- a/sage/gsl/dwt.pxd
++++ b/sage/gsl/dwt.pxd
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include "gsl_wavelet.pxi"
+ import gsl_array
+ cimport gsl_array
+diff --git a/sage/gsl/fft.pxd b/sage/gsl/fft.pxd
+--- a/sage/gsl/fft.pxd
++++ b/sage/gsl/fft.pxd
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include 'gsl.pxi'
+ 
+ cdef class FastFourierTransform_base:
+diff --git a/sage/gsl/fft.pyx b/sage/gsl/fft.pyx
+--- a/sage/gsl/fft.pyx
++++ b/sage/gsl/fft.pyx
+@@ -23,7 +23,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ import sage.plot.all
+ import sage.libs.pari.all
+diff --git a/sage/gsl/gsl_array.pxd b/sage/gsl/gsl_array.pxd
+--- a/sage/gsl/gsl_array.pxd
++++ b/sage/gsl/gsl_array.pxd
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include 'gsl.pxi'
+ cdef class GSLDoubleArray:
+     cdef size_t n
+diff --git a/sage/gsl/gsl_array.pyx b/sage/gsl/gsl_array.pyx
+--- a/sage/gsl/gsl_array.pyx
++++ b/sage/gsl/gsl_array.pyx
+@@ -1,6 +1,6 @@
+ #include 'gsl.pxi'
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ cdef class GSLDoubleArray:
+     r"""
+diff --git a/sage/gsl/integration.pyx b/sage/gsl/integration.pyx
+--- a/sage/gsl/integration.pyx
++++ b/sage/gsl/integration.pyx
+@@ -24,8 +24,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include 'gsl.pxi'
+ 
+ from sage.ext.fast_eval cimport FastDoubleFunc
+diff --git a/sage/gsl/interpolation.pxd b/sage/gsl/interpolation.pxd
+--- a/sage/gsl/interpolation.pxd
++++ b/sage/gsl/interpolation.pxd
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ include 'gsl.pxi'
+ 
+ cdef class Spline:
+diff --git a/sage/gsl/interpolation.pyx b/sage/gsl/interpolation.pyx
+--- a/sage/gsl/interpolation.pyx
++++ b/sage/gsl/interpolation.pyx
+@@ -2,7 +2,7 @@
+ Real Interpolation using GSL
+ """
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ cdef class Spline:
+     """
+diff --git a/sage/gsl/ode.pyx b/sage/gsl/ode.pyx
+--- a/sage/gsl/ode.pyx
++++ b/sage/gsl/ode.pyx
+@@ -16,9 +16,9 @@
+ ##############################################################################
+ 
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
+-include '../ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
+ include 'gsl.pxi'
+ 
+ 
+diff --git a/sage/gsl/probability_distribution.pyx b/sage/gsl/probability_distribution.pyx
+--- a/sage/gsl/probability_distribution.pyx
++++ b/sage/gsl/probability_distribution.pyx
+@@ -38,8 +38,8 @@
+ ##############################################################################
+ 
+ import sage.plot.plot
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi'
+ include 'gsl.pxi'
+ #cimport sage.rings.real_double
+ #import sage.rings.real_double
+diff --git a/sage/interacts/library_cython.pyx b/sage/interacts/library_cython.pyx
+--- a/sage/interacts/library_cython.pyx
++++ b/sage/interacts/library_cython.pyx
+@@ -18,9 +18,9 @@
+ 
+ from sage.misc.misc import prod
+ 
+-include '../ext/interrupt.pxi'
+-include '../ext/cdefs.pxi'
+-include "../ext/stdsage.pxi"
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include "sage/ext/stdsage.pxi"
+ 
+ cpdef julia(ff_j, z, int iterations):
+     """
+diff --git a/sage/libs/coxeter3/coxeter.pyx b/sage/libs/coxeter3/coxeter.pyx
+--- a/sage/libs/coxeter3/coxeter.pyx
++++ b/sage/libs/coxeter3/coxeter.pyx
+@@ -13,9 +13,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include "decl.pxi"
+ 
+ initConstants()
+diff --git a/sage/libs/coxeter3/decl.pxi b/sage/libs/coxeter3/decl.pxi
+--- a/sage/libs/coxeter3/decl.pxi
++++ b/sage/libs/coxeter3/decl.pxi
+@@ -5,8 +5,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef extern from "ccobject.h":
+     #We do this to get access to Construct_p, etc.
+diff --git a/sage/libs/cremona/homspace.pxd b/sage/libs/cremona/homspace.pxd
+--- a/sage/libs/cremona/homspace.pxd
++++ b/sage/libs/cremona/homspace.pxd
+@@ -5,7 +5,7 @@
+ cdef extern from "eclib/cusp.h":
+     pass
+ 
+-include "../../ext/interrupt.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ cdef extern from "eclib/homspace.h":
+     # From mat.h
+diff --git a/sage/libs/cremona/newforms.pxd b/sage/libs/cremona/newforms.pxd
+--- a/sage/libs/cremona/newforms.pxd
++++ b/sage/libs/cremona/newforms.pxd
+@@ -1,6 +1,6 @@
+-include "../../ext/interrupt.pxi"
+-include "../../ext/cdefs.pxi"
+-include "../ntl/decl.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/libs/ntl/decl.pxi"
+ include "defs.pxi"
+ 
+ cdef extern from "eclib/moddata.h":
+diff --git a/sage/libs/ecl.pyx b/sage/libs/ecl.pyx
+--- a/sage/libs/ecl.pyx
++++ b/sage/libs/ecl.pyx
+@@ -14,9 +14,9 @@
+ #rationals to SAGE types Integer and Rational. These parts could easily be
+ #adapted to work with pure Python types.
+ 
+-include "../ext/signals.pxi"
+-include "../ext/interrupt.pxi"
+-include "../ext/cdefs.pxi"
++include "sage/ext/signals.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.rings.integer cimport Integer
+ from sage.rings.rational cimport Rational
+diff --git a/sage/libs/fes.pyx b/sage/libs/fes.pyx
+--- a/sage/libs/fes.pyx
++++ b/sage/libs/fes.pyx
+@@ -75,8 +75,8 @@
+     void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
+ 
+ 
+-include '../ext/interrupt.pxi'  #sig_on(), sig_off()
+-include '../ext/stdsage.pxi'  #sage_calloc(), sage_free()
++include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
++include 'sage/ext/stdsage.pxi'  #sage_calloc(), sage_free()
+ 
+ from sage.rings.integer import Integer
+ from sage.rings.infinity import Infinity
+diff --git a/sage/libs/flint/flint.pyx b/sage/libs/flint/flint.pyx
+--- a/sage/libs/flint/flint.pyx
++++ b/sage/libs/flint/flint.pyx
+@@ -10,8 +10,8 @@
+     sage: a == b
+     True
+ """
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ def free_flint_stack():
+     _fmpz_cleanup_mpz_content()
+diff --git a/sage/libs/flint/fmpz.pxi b/sage/libs/flint/fmpz.pxi
+--- a/sage/libs/flint/fmpz.pxi
++++ b/sage/libs/flint/fmpz.pxi
+@@ -1,4 +1,4 @@
+-include "../ntl/decl.pxi"
++include "sage/libs/ntl/decl.pxi"
+ 
+ cdef extern from "flint/fmpz.h":
+ 
+diff --git a/sage/libs/flint/fmpz_poly.pxd b/sage/libs/flint/fmpz_poly.pxd
+--- a/sage/libs/flint/fmpz_poly.pxd
++++ b/sage/libs/flint/fmpz_poly.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ from flint cimport *
+ include "fmpz_poly.pxi"
+diff --git a/sage/libs/flint/fmpz_poly.pxi b/sage/libs/flint/fmpz_poly.pxi
+--- a/sage/libs/flint/fmpz_poly.pxi
++++ b/sage/libs/flint/fmpz_poly.pxi
+@@ -1,5 +1,5 @@
+ include "fmpz.pxi"
+-include "../ntl/decl.pxi"
++include "sage/libs/ntl/decl.pxi"
+ 
+ from sage.libs.flint.nmod_poly cimport nmod_poly_t
+ 
+diff --git a/sage/libs/flint/nmod_poly.pxd b/sage/libs/flint/nmod_poly.pxd
+--- a/sage/libs/flint/nmod_poly.pxd
++++ b/sage/libs/flint/nmod_poly.pxd
+@@ -1,5 +1,5 @@
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.flint.flint cimport *
+ 
+diff --git a/sage/libs/flint/nmod_poly_linkage.pxi b/sage/libs/flint/nmod_poly_linkage.pxi
+--- a/sage/libs/flint/nmod_poly_linkage.pxi
++++ b/sage/libs/flint/nmod_poly_linkage.pxi
+@@ -20,7 +20,7 @@
+ from sage.libs.flint.nmod_poly cimport *, nmod_poly_t
+ from sage.libs.flint.ulong_extras cimport *
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cdef inline celement *celement_new(unsigned long n):
+     cdef celement *g = <celement *>sage_malloc(sizeof(nmod_poly_t))
+diff --git a/sage/libs/flint/ulong_extras.pxd b/sage/libs/flint/ulong_extras.pxd
+--- a/sage/libs/flint/ulong_extras.pxd
++++ b/sage/libs/flint/ulong_extras.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ from sage.libs.flint.flint cimport *
+ 
+diff --git a/sage/libs/fplll/fplll.pxd b/sage/libs/fplll/fplll.pxd
+--- a/sage/libs/fplll/fplll.pxd
++++ b/sage/libs/fplll/fplll.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ include "fplll.pxi"
+ 
+ cdef class FP_LLL:
+diff --git a/sage/libs/fplll/fplll.pyx b/sage/libs/fplll/fplll.pyx
+--- a/sage/libs/fplll/fplll.pyx
++++ b/sage/libs/fplll/fplll.pyx
+@@ -31,7 +31,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
+ from sage.rings.integer_ring import ZZ
+diff --git a/sage/libs/gap/gap_includes.pxd b/sage/libs/gap/gap_includes.pxd
+--- a/sage/libs/gap/gap_includes.pxd
++++ b/sage/libs/gap/gap_includes.pxd
+@@ -9,8 +9,8 @@
+ ###############################################################################
+ 
+ 
+-include "../../ext/stdsage.pxi"
+-include "../../ext/interrupt.pxi"  # ctrl-c interrupt block support
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"  # ctrl-c interrupt block support
+ 
+ cdef extern from "gap/libgap.h":
+     void libgap_initialize(int argc, char** argv)
+diff --git a/sage/libs/gap/util.pyx b/sage/libs/gap/util.pyx
+--- a/sage/libs/gap/util.pyx
++++ b/sage/libs/gap/util.pyx
+@@ -324,7 +324,7 @@
+ cdef extern from 'stdlib.h':
+     void abort()
+ 
+-include '../../ext/interrupt.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ cdef void error_handler(char* msg):
+     """
+diff --git a/sage/libs/lcalc/lcalc_Lfunction.pxd b/sage/libs/lcalc/lcalc_Lfunction.pxd
+--- a/sage/libs/lcalc/lcalc_Lfunction.pxd
++++ b/sage/libs/lcalc/lcalc_Lfunction.pxd
+@@ -1,6 +1,6 @@
+-include "../../ext/interrupt.pxi"
+-include "../../ext/cdefs.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ cdef extern from "lcalc_sage.h":
+ 
+diff --git a/sage/libs/lcalc/lcalc_Lfunction.pyx b/sage/libs/lcalc/lcalc_Lfunction.pyx
+--- a/sage/libs/lcalc/lcalc_Lfunction.pyx
++++ b/sage/libs/lcalc/lcalc_Lfunction.pyx
+@@ -21,9 +21,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include "../mpfr.pxd"
+ 
+ from sage.rings.integer cimport Integer
+diff --git a/sage/libs/libecm.pyx b/sage/libs/libecm.pyx
+--- a/sage/libs/libecm.pyx
++++ b/sage/libs/libecm.pyx
+@@ -34,8 +34,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/interrupt.pxi'
+ 
+ from sage.rings.integer cimport Integer
+ 
+diff --git a/sage/libs/linbox/linbox.pxd b/sage/libs/linbox/linbox.pxd
+--- a/sage/libs/linbox/linbox.pxd
++++ b/sage/libs/linbox/linbox.pxd
+@@ -1,6 +1,6 @@
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+-include '../../modules/vector_modn_sparse_h.pxi'
++include 'sage/modules/vector_modn_sparse_h.pxi'
+ 
+ from sage.matrix.matrix_integer_dense cimport mod_int
+ 
+diff --git a/sage/libs/linbox/linbox.pyx b/sage/libs/linbox/linbox.pyx
+--- a/sage/libs/linbox/linbox.pyx
++++ b/sage/libs/linbox/linbox.pyx
+@@ -9,8 +9,8 @@
+ ## Sparse matrices modulo p.
+ ##########################################################################
+ 
+-include '../../modules/vector_modn_sparse_c.pxi'
+-include '../../ext/stdsage.pxi'
++include 'sage/modules/vector_modn_sparse_c.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ cdef extern from "linbox/linbox-sage.h":
+     ctypedef struct vector_uint "std::vector<unsigned int>":
+diff --git a/sage/libs/mpmath/ext_impl.pyx b/sage/libs/mpmath/ext_impl.pyx
+--- a/sage/libs/mpmath/ext_impl.pyx
++++ b/sage/libs/mpmath/ext_impl.pyx
+@@ -3,8 +3,8 @@
+ floating-point arithmetic. Operations are done in-place.
+ """
+ 
+-include '../../ext/interrupt.pxi'
+-include "../../ext/stdsage.pxi"
++include 'sage/ext/interrupt.pxi'
++include "sage/ext/stdsage.pxi"
+ from cpython.int cimport *
+ from cpython.long cimport *
+ from cpython.float cimport *
+diff --git a/sage/libs/mpmath/ext_libmp.pyx b/sage/libs/mpmath/ext_libmp.pyx
+--- a/sage/libs/mpmath/ext_libmp.pyx
++++ b/sage/libs/mpmath/ext_libmp.pyx
+@@ -2,7 +2,7 @@
+ Faster versions of some key functions in mpmath.libmp.
+ """
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ from ext_impl cimport *
+ from sage.libs.gmp.all cimport *
+ from sage.rings.integer cimport Integer
+diff --git a/sage/libs/mpmath/ext_main.pyx b/sage/libs/mpmath/ext_main.pyx
+--- a/sage/libs/mpmath/ext_main.pyx
++++ b/sage/libs/mpmath/ext_main.pyx
+@@ -4,8 +4,8 @@
+ context class, and related utilities.
+ """
+ 
+-include '../../ext/interrupt.pxi'
+-include "../../ext/stdsage.pxi"
++include 'sage/ext/interrupt.pxi'
++include "sage/ext/stdsage.pxi"
+ from cpython.int cimport *
+ from cpython.long cimport *
+ from cpython.float cimport *
+diff --git a/sage/libs/mpmath/utils.pxd b/sage/libs/mpmath/utils.pxd
+--- a/sage/libs/mpmath/utils.pxd
++++ b/sage/libs/mpmath/utils.pxd
+@@ -1,4 +1,4 @@
+-include '../../ext/cdefs.pxi'
++include 'sage/ext/cdefs.pxi'
+ from sage.libs.mpfr cimport *
+ 
+ cdef mpfr_to_mpfval(mpfr_t)
+diff --git a/sage/libs/mpmath/utils.pyx b/sage/libs/mpmath/utils.pyx
+--- a/sage/libs/mpmath/utils.pyx
++++ b/sage/libs/mpmath/utils.pyx
+@@ -1,7 +1,7 @@
+ # Utilities for Sage-mpmath interaction
+ # Also patches some mpmath functions for speed
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ from sage.rings.integer cimport Integer
+ from sage.rings.real_mpfr cimport RealNumber
+diff --git a/sage/libs/mwrank/mwrank.pyx b/sage/libs/mwrank/mwrank.pyx
+--- a/sage/libs/mwrank/mwrank.pyx
++++ b/sage/libs/mwrank/mwrank.pyx
+@@ -22,8 +22,8 @@
+ import os
+ import sys
+ 
+-include '../../ext/interrupt.pxi'
+-include '../../ext/stdsage.pxi'
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ # Need to permit tabs in order to doctest verbose output.
+ """
+diff --git a/sage/libs/ntl/decl.pxi b/sage/libs/ntl/decl.pxi
+--- a/sage/libs/ntl/decl.pxi
++++ b/sage/libs/ntl/decl.pxi
+@@ -1,6 +1,6 @@
+-include "../../ext/cdefs.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/python.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/python.pxi"
+ 
+ 
+ cdef extern from "ntl_wrap.h":
+diff --git a/sage/libs/ntl/ntl_GF2.pyx b/sage/libs/ntl/ntl_GF2.pyx
+--- a/sage/libs/ntl/ntl_GF2.pyx
++++ b/sage/libs/ntl/ntl_GF2.pyx
+@@ -13,9 +13,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_GF2E.pxd b/sage/libs/ntl/ntl_GF2E.pxd
+--- a/sage/libs/ntl/ntl_GF2E.pxd
++++ b/sage/libs/ntl/ntl_GF2E.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_GF2EContext cimport ntl_GF2EContext_class
+ 
+diff --git a/sage/libs/ntl/ntl_GF2E.pyx b/sage/libs/ntl/ntl_GF2E.pyx
+--- a/sage/libs/ntl/ntl_GF2E.pyx
++++ b/sage/libs/ntl/ntl_GF2E.pyx
+@@ -14,9 +14,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/random.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/random.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_GF2EContext.pxd b/sage/libs/ntl/ntl_GF2EContext.pxd
+--- a/sage/libs/ntl/ntl_GF2EContext.pxd
++++ b/sage/libs/ntl/ntl_GF2EContext.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_GF2X cimport ntl_GF2X
+ 
+diff --git a/sage/libs/ntl/ntl_GF2EContext.pyx b/sage/libs/ntl/ntl_GF2EContext.pyx
+--- a/sage/libs/ntl/ntl_GF2EContext.pyx
++++ b/sage/libs/ntl/ntl_GF2EContext.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ import weakref
+diff --git a/sage/libs/ntl/ntl_GF2EX.pxd b/sage/libs/ntl/ntl_GF2EX.pxd
+--- a/sage/libs/ntl/ntl_GF2EX.pxd
++++ b/sage/libs/ntl/ntl_GF2EX.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_GF2EContext cimport ntl_GF2EContext_class
+ from ntl_GF2E cimport ntl_GF2E
+diff --git a/sage/libs/ntl/ntl_GF2EX.pyx b/sage/libs/ntl/ntl_GF2EX.pyx
+--- a/sage/libs/ntl/ntl_GF2EX.pyx
++++ b/sage/libs/ntl/ntl_GF2EX.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_GF2X.pxd b/sage/libs/ntl/ntl_GF2X.pxd
+--- a/sage/libs/ntl/ntl_GF2X.pxd
++++ b/sage/libs/ntl/ntl_GF2X.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef class ntl_GF2X:
+     cdef GF2X_c x
+diff --git a/sage/libs/ntl/ntl_GF2X.pyx b/sage/libs/ntl/ntl_GF2X.pyx
+--- a/sage/libs/ntl/ntl_GF2X.pyx
++++ b/sage/libs/ntl/ntl_GF2X.pyx
+@@ -14,8 +14,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ.pyx b/sage/libs/ntl/ntl_ZZ.pyx
+--- a/sage/libs/ntl/ntl_ZZ.pyx
++++ b/sage/libs/ntl/ntl_ZZ.pyx
+@@ -13,10 +13,10 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
+-include "../../ext/random.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/random.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZX.pxd b/sage/libs/ntl/ntl_ZZX.pxd
+--- a/sage/libs/ntl/ntl_ZZX.pxd
++++ b/sage/libs/ntl/ntl_ZZX.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef class ntl_ZZX:
+     cdef ZZX_c x
+diff --git a/sage/libs/ntl/ntl_ZZX.pyx b/sage/libs/ntl/ntl_ZZX.pyx
+--- a/sage/libs/ntl/ntl_ZZX.pyx
++++ b/sage/libs/ntl/ntl_ZZX.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include "decl.pxi"
+ include 'misc.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZX_decl.pxd b/sage/libs/ntl/ntl_ZZX_decl.pxd
+--- a/sage/libs/ntl/ntl_ZZX_decl.pxd
++++ b/sage/libs/ntl/ntl_ZZX_decl.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.ntl.ntl_ZZ_decl cimport vec_ZZ_c
+ from sage.libs.ntl.ntl_ZZ_decl cimport ZZ_c
+diff --git a/sage/libs/ntl/ntl_ZZ_decl.pxd b/sage/libs/ntl/ntl_ZZ_decl.pxd
+--- a/sage/libs/ntl/ntl_ZZ_decl.pxd
++++ b/sage/libs/ntl/ntl_ZZ_decl.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef extern from "ntl_wrap.h":
+     #### ZZ_c
+diff --git a/sage/libs/ntl/ntl_ZZ_p.pyx b/sage/libs/ntl/ntl_ZZ_p.pyx
+--- a/sage/libs/ntl/ntl_ZZ_p.pyx
++++ b/sage/libs/ntl/ntl_ZZ_p.pyx
+@@ -13,10 +13,10 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
+-include "../../ext/random.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/random.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pContext.pxd b/sage/libs/ntl/ntl_ZZ_pContext.pxd
+--- a/sage/libs/ntl/ntl_ZZ_pContext.pxd
++++ b/sage/libs/ntl/ntl_ZZ_pContext.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pContext.pyx b/sage/libs/ntl/ntl_ZZ_pContext.pyx
+--- a/sage/libs/ntl/ntl_ZZ_pContext.pyx
++++ b/sage/libs/ntl/ntl_ZZ_pContext.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ import weakref
+diff --git a/sage/libs/ntl/ntl_ZZ_pE.pyx b/sage/libs/ntl/ntl_ZZ_pE.pyx
+--- a/sage/libs/ntl/ntl_ZZ_pE.pyx
++++ b/sage/libs/ntl/ntl_ZZ_pE.pyx
+@@ -13,9 +13,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pEContext.pxd b/sage/libs/ntl/ntl_ZZ_pEContext.pxd
+--- a/sage/libs/ntl/ntl_ZZ_pEContext.pxd
++++ b/sage/libs/ntl/ntl_ZZ_pEContext.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pEContext.pyx b/sage/libs/ntl/ntl_ZZ_pEContext.pyx
+--- a/sage/libs/ntl/ntl_ZZ_pEContext.pyx
++++ b/sage/libs/ntl/ntl_ZZ_pEContext.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pEX.pxd b/sage/libs/ntl/ntl_ZZ_pEX.pxd
+--- a/sage/libs/ntl/ntl_ZZ_pEX.pxd
++++ b/sage/libs/ntl/ntl_ZZ_pEX.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pEX.pyx b/sage/libs/ntl/ntl_ZZ_pEX.pyx
+--- a/sage/libs/ntl/ntl_ZZ_pEX.pyx
++++ b/sage/libs/ntl/ntl_ZZ_pEX.pyx
+@@ -21,8 +21,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi b/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi
+--- a/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi
++++ b/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi
+@@ -14,7 +14,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
+ from sage.libs.ntl.ntl_ZZ_pEContext_decl cimport *, ZZ_pEContext_c
+diff --git a/sage/libs/ntl/ntl_ZZ_pX.pxd b/sage/libs/ntl/ntl_ZZ_pX.pxd
+--- a/sage/libs/ntl/ntl_ZZ_pX.pxd
++++ b/sage/libs/ntl/ntl_ZZ_pX.pxd
+@@ -1,4 +1,4 @@
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_ZZ_pX_decl cimport *, ZZ_pX_c, ZZ_pX_Modulus_c
+ from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
+diff --git a/sage/libs/ntl/ntl_ZZ_pX.pyx b/sage/libs/ntl/ntl_ZZ_pX.pyx
+--- a/sage/libs/ntl/ntl_ZZ_pX.pyx
++++ b/sage/libs/ntl/ntl_ZZ_pX.pyx
+@@ -13,9 +13,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/random.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/random.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_lzz_p.pyx b/sage/libs/ntl/ntl_lzz_p.pyx
+--- a/sage/libs/ntl/ntl_lzz_p.pyx
++++ b/sage/libs/ntl/ntl_lzz_p.pyx
+@@ -30,9 +30,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_lzz_pContext.pxd b/sage/libs/ntl/ntl_lzz_pContext.pxd
+--- a/sage/libs/ntl/ntl_lzz_pContext.pxd
++++ b/sage/libs/ntl/ntl_lzz_pContext.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef class ntl_zz_pContext_class:
+     cdef zz_pContext_c x
+diff --git a/sage/libs/ntl/ntl_lzz_pContext.pyx b/sage/libs/ntl/ntl_lzz_pContext.pyx
+--- a/sage/libs/ntl/ntl_lzz_pContext.pyx
++++ b/sage/libs/ntl/ntl_lzz_pContext.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_lzz_pX.pyx b/sage/libs/ntl/ntl_lzz_pX.pyx
+--- a/sage/libs/ntl/ntl_lzz_pX.pyx
++++ b/sage/libs/ntl/ntl_lzz_pX.pyx
+@@ -22,9 +22,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_mat_GF2.pxd b/sage/libs/ntl/ntl_mat_GF2.pxd
+--- a/sage/libs/ntl/ntl_mat_GF2.pxd
++++ b/sage/libs/ntl/ntl_mat_GF2.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_GF2 cimport ntl_GF2
+ 
+diff --git a/sage/libs/ntl/ntl_mat_GF2.pyx b/sage/libs/ntl/ntl_mat_GF2.pyx
+--- a/sage/libs/ntl/ntl_mat_GF2.pyx
++++ b/sage/libs/ntl/ntl_mat_GF2.pyx
+@@ -26,8 +26,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_mat_GF2E.pxd b/sage/libs/ntl/ntl_mat_GF2E.pxd
+--- a/sage/libs/ntl/ntl_mat_GF2E.pxd
++++ b/sage/libs/ntl/ntl_mat_GF2E.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from ntl_GF2EContext cimport ntl_GF2EContext_class
+ from ntl_GF2E cimport ntl_GF2E
+diff --git a/sage/libs/ntl/ntl_mat_GF2E.pyx b/sage/libs/ntl/ntl_mat_GF2E.pyx
+--- a/sage/libs/ntl/ntl_mat_GF2E.pyx
++++ b/sage/libs/ntl/ntl_mat_GF2E.pyx
+@@ -23,9 +23,9 @@
+ #
+ ##############################################################################
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
+-include '../../ext/random.pxi'
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include 'sage/ext/random.pxi'
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/ntl/ntl_mat_ZZ.pxd b/sage/libs/ntl/ntl_mat_ZZ.pxd
+--- a/sage/libs/ntl/ntl_mat_ZZ.pxd
++++ b/sage/libs/ntl/ntl_mat_ZZ.pxd
+@@ -1,5 +1,5 @@
+ include "decl.pxi"
+-include "../../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cdef class ntl_mat_ZZ:
+     cdef mat_ZZ_c x
+diff --git a/sage/libs/ntl/ntl_mat_ZZ.pyx b/sage/libs/ntl/ntl_mat_ZZ.pyx
+--- a/sage/libs/ntl/ntl_mat_ZZ.pyx
++++ b/sage/libs/ntl/ntl_mat_ZZ.pyx
+@@ -13,8 +13,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/interrupt.pxi"
+-include "../../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ include 'misc.pxi'
+ include 'decl.pxi'
+ 
+diff --git a/sage/libs/pari/decl.pxi b/sage/libs/pari/decl.pxi
+--- a/sage/libs/pari/decl.pxi
++++ b/sage/libs/pari/decl.pxi
+@@ -18,7 +18,7 @@
+ 
+ """
+ 
+-include '../../ext/cdefs.pxi'
++include 'sage/ext/cdefs.pxi'
+ 
+ cdef extern from 'setjmp.h':
+     struct __jmp_buf_tag:
+diff --git a/sage/libs/pari/gen.pyx b/sage/libs/pari/gen.pyx
+--- a/sage/libs/pari/gen.pyx
++++ b/sage/libs/pari/gen.pyx
+@@ -177,8 +177,8 @@
+ from sage.misc.misc_c import is_64_bit
+ 
+ include 'pari_err.pxi'
+-include '../../ext/stdsage.pxi'
+-include '../../ext/python.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/python.pxi'
+ 
+ cdef extern from "mpz_pylong.h":
+     cdef int mpz_set_pylong(mpz_t dst, src) except -1
+diff --git a/sage/libs/ppl.pyx b/sage/libs/ppl.pyx
+--- a/sage/libs/ppl.pyx
++++ b/sage/libs/ppl.pyx
+@@ -153,9 +153,9 @@
+ from sage.rings.integer cimport Integer
+ from sage.rings.rational import Rational
+ 
+-include '../ext/interrupt.pxi'
+-include "../ext/stdsage.pxi"
+-include "../ext/cdefs.pxi"
++include 'sage/ext/interrupt.pxi'
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from libcpp cimport bool as cppbool
+ 
+diff --git a/sage/libs/ratpoints.pxd b/sage/libs/ratpoints.pxd
+--- a/sage/libs/ratpoints.pxd
++++ b/sage/libs/ratpoints.pxd
+@@ -1,7 +1,7 @@
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi'
+-include '../ext/interrupt.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/interrupt.pxi'
+ from sage.rings.integer cimport Integer
+ 
+ cdef extern from "ratpoints.h":
+diff --git a/sage/libs/singular/function.pyx b/sage/libs/singular/function.pyx
+--- a/sage/libs/singular/function.pyx
++++ b/sage/libs/singular/function.pyx
+@@ -70,8 +70,8 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/stdsage.pxi"
+-include "../../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ from sage.structure.sage_object cimport SageObject
+ 
+diff --git a/sage/libs/singular/polynomial.pyx b/sage/libs/singular/polynomial.pyx
+--- a/sage/libs/singular/polynomial.pyx
++++ b/sage/libs/singular/polynomial.pyx
+@@ -11,7 +11,7 @@
+ #  Distributed under the terms of the GNU General Public License (GPL)
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+-include "../../ext/interrupt.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ cdef extern from "":
+     int unlikely(int)
+diff --git a/sage/libs/singular/ring.pyx b/sage/libs/singular/ring.pyx
+--- a/sage/libs/singular/ring.pyx
++++ b/sage/libs/singular/ring.pyx
+@@ -14,7 +14,7 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../../ext/stdsage.pxi"
++include "sage/ext/stdsage.pxi"
+ 
+ from sage.libs.gmp.types cimport __mpz_struct
+ from sage.libs.gmp.mpz cimport mpz_init_set_ui, mpz_init_set
+diff --git a/sage/libs/symmetrica/symmetrica.pyx b/sage/libs/symmetrica/symmetrica.pyx
+--- a/sage/libs/symmetrica/symmetrica.pyx
++++ b/sage/libs/symmetrica/symmetrica.pyx
+@@ -1,5 +1,5 @@
+-include "../../ext/interrupt.pxi"
+-include '../../ext/stdsage.pxi'
++include "sage/ext/interrupt.pxi"
++include 'sage/ext/stdsage.pxi'
+ 
+ include "symmetrica.pxi"
+ 
+diff --git a/sage/matrix/change_ring.pyx b/sage/matrix/change_ring.pyx
+--- a/sage/matrix/change_ring.pyx
++++ b/sage/matrix/change_ring.pyx
+@@ -8,8 +8,8 @@
+ 
+ from sage.rings.real_double import RDF
+ 
+-include "../ext/cdefs.pxi"
+-include "../ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ def integer_to_real_double_dense(Matrix_integer_dense A):
+     """
+diff --git a/sage/matrix/matrix.pyx b/sage/matrix/matrix.pyx
+--- a/sage/matrix/matrix.pyx
++++ b/sage/matrix/matrix.pyx
+@@ -13,7 +13,7 @@
+ #                  http://www.gnu.org/licenses/
+ ################################################################################
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ def is_Matrix(x):
+     """
+diff --git a/sage/matrix/matrix0.pyx b/sage/matrix/matrix0.pyx
+--- a/sage/matrix/matrix0.pyx
++++ b/sage/matrix/matrix0.pyx
+@@ -21,12 +21,12 @@
+ #                  http://www.gnu.org/licenses/
+ ################################################################################
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/cdefs.pxi"
+-include "../ext/python.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/python.pxi"
+ from cpython.list cimport *
+ from cpython.object cimport *
+-include "../ext/python_slice.pxi"
++include "sage/ext/python_slice.pxi"
+ from cpython.tuple cimport *
+ 
+ import sage.modules.free_module
+diff --git a/sage/matrix/matrix1.pyx b/sage/matrix/matrix1.pyx
+--- a/sage/matrix/matrix1.pyx
++++ b/sage/matrix/matrix1.pyx
+@@ -18,8 +18,8 @@
+ #                  http://www.gnu.org/licenses/
+ ################################################################################
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/python.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/python.pxi"
+ 
+ import sage.modules.free_module
+ 
+diff --git a/sage/matrix/matrix2.pyx b/sage/matrix/matrix2.pyx
+--- a/sage/matrix/matrix2.pyx
++++ b/sage/matrix/matrix2.pyx
+@@ -27,9 +27,9 @@
+ #                  http://www.gnu.org/licenses/
+ #*****************************************************************************
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/python.pxi"
+-include "../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/python.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ from sage.misc.randstate cimport randstate, current_randstate
+ from sage.structure.sequence import Sequence
+diff --git a/sage/matrix/matrix_cyclo_dense.pxd b/sage/matrix/matrix_cyclo_dense.pxd
+--- a/sage/matrix/matrix_cyclo_dense.pxd
++++ b/sage/matrix/matrix_cyclo_dense.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ from matrix_dense cimport Matrix_dense
+ from matrix_rational_dense cimport Matrix_rational_dense
+diff --git a/sage/matrix/matrix_cyclo_dense.pyx b/sage/matrix/matrix_cyclo_dense.pyx
+--- a/sage/matrix/matrix_cyclo_dense.pyx
++++ b/sage/matrix/matrix_cyclo_dense.pyx
+@@ -34,12 +34,12 @@
+ #                  http://www.gnu.org/licenses/
+ ######################################################################
+ 
+-include "../ext/interrupt.pxi"
+-# include "../ext/stdsage.pxi"
+-include "../ext/cdefs.pxi"
+-include "../ext/gmp.pxi"
+-include "../ext/random.pxi"
+-include "../libs/ntl/decl.pxi"
++include "sage/ext/interrupt.pxi"
++# include "sage/ext/stdsage.pxi"
++include "sage/ext/cdefs.pxi"
++include "sage/ext/gmp.pxi"
++include "sage/ext/random.pxi"
++include "sage/libs/ntl/decl.pxi"
+ 
+ from sage.structure.element cimport ModuleElement, RingElement, Element, Vector
+ from sage.misc.randstate cimport randstate, current_randstate
+diff --git a/sage/matrix/matrix_dense.pyx b/sage/matrix/matrix_dense.pyx
+--- a/sage/matrix/matrix_dense.pyx
++++ b/sage/matrix/matrix_dense.pyx
+@@ -14,8 +14,8 @@
+ import sage.matrix.matrix_space
+ import sage.structure.sequence
+ 
+-include '../ext/cdefs.pxi'
+-include '../ext/stdsage.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ cdef class Matrix_dense(matrix.Matrix):
+     cdef bint is_sparse_c(self):
+diff --git a/sage/matrix/matrix_generic_dense.pyx b/sage/matrix/matrix_generic_dense.pyx
+--- a/sage/matrix/matrix_generic_dense.pyx
++++ b/sage/matrix/matrix_generic_dense.pyx
+@@ -17,8 +17,8 @@
+     copy = False
+     return e
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ from cpython.list cimport *
+ from cpython.number cimport *
+ from cpython.ref cimport *
+diff --git a/sage/matrix/matrix_integer_2x2.pxd b/sage/matrix/matrix_integer_2x2.pxd
+--- a/sage/matrix/matrix_integer_2x2.pxd
++++ b/sage/matrix/matrix_integer_2x2.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cimport matrix_dense
+ 
+diff --git a/sage/matrix/matrix_integer_2x2.pyx b/sage/matrix/matrix_integer_2x2.pyx
+--- a/sage/matrix/matrix_integer_2x2.pyx
++++ b/sage/matrix/matrix_integer_2x2.pyx
+@@ -2,8 +2,8 @@
+ Two by two matrices over the integers.
+ """
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
+ from cpython.list cimport *
+ from cpython.number cimport *
+ from cpython.ref cimport *
+diff --git a/sage/matrix/matrix_integer_dense.pxd b/sage/matrix/matrix_integer_dense.pxd
+--- a/sage/matrix/matrix_integer_dense.pxd
++++ b/sage/matrix/matrix_integer_dense.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ cimport matrix_dense
+ cimport sage.rings.integer
+diff --git a/sage/matrix/matrix_integer_dense.pyx b/sage/matrix/matrix_integer_dense.pyx
+--- a/sage/matrix/matrix_integer_dense.pyx
++++ b/sage/matrix/matrix_integer_dense.pyx
+@@ -79,10 +79,10 @@
+ 
+ #########################################################
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/stdsage.pxi"
+-include "../ext/gmp.pxi"
+-include "../ext/random.pxi"
++include "sage/ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/gmp.pxi"
++include "sage/ext/random.pxi"
+ 
+ cdef extern from "math.h":
+     double log(double x)
+diff --git a/sage/matrix/matrix_integer_sparse.pxd b/sage/matrix/matrix_integer_sparse.pxd
+--- a/sage/matrix/matrix_integer_sparse.pxd
++++ b/sage/matrix/matrix_integer_sparse.pxd
+@@ -1,5 +1,5 @@
+-include '../ext/cdefs.pxi'
+-include '../modules/vector_integer_sparse_h.pxi'
++include 'sage/ext/cdefs.pxi'
++include 'sage/modules/vector_integer_sparse_h.pxi'
+ 
+ cdef extern from "../ext/multi_modular.h":
+     ctypedef unsigned long mod_int
+diff --git a/sage/matrix/matrix_integer_sparse.pyx b/sage/matrix/matrix_integer_sparse.pyx
+--- a/sage/matrix/matrix_integer_sparse.pyx
++++ b/sage/matrix/matrix_integer_sparse.pyx
+@@ -19,14 +19,14 @@
+ #                  http://www.gnu.org/licenses/
+ ##############################################################################
+ 
+-include '../modules/binary_search.pxi'
+-include '../modules/vector_integer_sparse_h.pxi'
+-include '../modules/vector_integer_sparse_c.pxi'
+-include '../modules/vector_modn_sparse_h.pxi'
+-include '../modules/vector_modn_sparse_c.pxi'
++include 'sage/modules/binary_search.pxi'
++include 'sage/modules/vector_integer_sparse_h.pxi'
++include 'sage/modules/vector_integer_sparse_c.pxi'
++include 'sage/modules/vector_modn_sparse_h.pxi'
++include 'sage/modules/vector_modn_sparse_c.pxi'
+ from cpython.sequence cimport *
+ 
+-include '../ext/stdsage.pxi'
++include 'sage/ext/stdsage.pxi'
+ 
+ from sage.rings.integer  cimport Integer
+ from matrix cimport Matrix
+diff --git a/sage/matrix/matrix_mod2_dense.pyx b/sage/matrix/matrix_mod2_dense.pyx
+--- a/sage/matrix/matrix_mod2_dense.pyx
++++ b/sage/matrix/matrix_mod2_dense.pyx
+@@ -93,10 +93,10 @@
+ #                  http://www.gnu.org/licenses/
+ ##############################################################################
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/cdefs.pxi"
+-include '../ext/stdsage.pxi'
+-include '../ext/random.pxi'
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/random.pxi'
+ 
+ cimport matrix_dense
+ from sage.structure.element cimport Matrix, Vector
+diff --git a/sage/matrix/matrix_mod2e_dense.pyx b/sage/matrix/matrix_mod2e_dense.pyx
+--- a/sage/matrix/matrix_mod2e_dense.pyx
++++ b/sage/matrix/matrix_mod2e_dense.pyx
+@@ -65,10 +65,10 @@
+ 2009. http://arxiv.org/abs/0901.1413
+ """
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/cdefs.pxi"
+-include '../ext/stdsage.pxi'
+-include '../ext/random.pxi'
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/random.pxi'
+ 
+ cimport matrix_dense
+ from sage.structure.element cimport Matrix, Vector
+diff --git a/sage/matrix/matrix_modn_dense.pyx b/sage/matrix/matrix_modn_dense.pyx
+--- a/sage/matrix/matrix_modn_dense.pyx
++++ b/sage/matrix/matrix_modn_dense.pyx
+@@ -95,10 +95,10 @@
+ """
+ 
+ 
+-include "../ext/interrupt.pxi"
+-include "../ext/cdefs.pxi"
+-include '../ext/stdsage.pxi'
+-include '../ext/random.pxi'
++include "sage/ext/interrupt.pxi"
++include "sage/ext/cdefs.pxi"
++include 'sage/ext/stdsage.pxi'
++include 'sage/ext/random.pxi'
+ from cpython.string cimport *
+ 
+ import sage.ext.multi_modular
+diff --git a/sage/matrix/matrix_modn_dense_double.pxd b/sage/matrix/matrix_modn_dense_double.pxd
+--- a/sage/matrix/matrix_modn_dense_double.pxd
++++ b/sage/matrix/matrix_modn_dense_double.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ ctypedef double celement
+ 
+diff --git a/sage/matrix/matrix_modn_dense_double.pyx b/sage/matrix/matrix_modn_dense_double.pyx
+--- a/sage/matrix/matrix_modn_dense_double.pyx
++++ b/sage/matrix/matrix_modn_dense_double.pyx
+@@ -14,11 +14,11 @@
+ #                  http://www.gnu.org/licenses/
+ ###############################################################################
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ # randstate in template needs this
+-include '../ext/random.pxi'
++include 'sage/ext/random.pxi'
+ 
+ from sage.libs.linbox.echelonform cimport BlasMatrixDouble as BlasMatrix
+ from sage.libs.linbox.modular cimport ModDoubleField as ModField, ModDoubleFieldElement as ModFieldElement
+diff --git a/sage/matrix/matrix_modn_dense_float.pxd b/sage/matrix/matrix_modn_dense_float.pxd
+--- a/sage/matrix/matrix_modn_dense_float.pxd
++++ b/sage/matrix/matrix_modn_dense_float.pxd
+@@ -1,4 +1,4 @@
+-include "../ext/cdefs.pxi"
++include "sage/ext/cdefs.pxi"
+ 
+ ctypedef float celement
+ 
+diff --git a/sage/matrix/matrix_modn_dense_float.pyx b/sage/matrix/matrix_modn_dense_float.pyx
+--- a/sage/matrix/matrix_modn_dense_float.pyx
++++ b/sage/matrix/matrix_modn_dense_float.pyx
+@@ -14,11 +14,11 @@
+ #                  http://www.gnu.org/licenses/
+ ###############################################################################
+ 
+-include "../ext/stdsage.pxi"
+-include "../ext/interrupt.pxi"
++include "sage/ext/stdsage.pxi"
++include "sage/ext/interrupt.pxi"
+ 
+ # randstate in template needs this
+-include '../ext/random.pxi'
++include 'sage/ext/random.pxi'
+ 
+ from sage.libs.linbox.echelonform cimport BlasMatrixFloat as BlasMatrix
+ from sage.libs.linbox.modular cimport ModFloatField as ModField, ModFloatFieldElement as ModFieldElement
+diff --git a/sage/matrix/matrix_modn_sparse.pxd b/sage/matrix/matrix_modn_sparse.pxd
+--- a/sage/matrix/matrix_modn_sparse.pxd
++++ b/sage/matrix/matrix_modn_sparse.pxd
+@@ -1,6 +1,6 @@
+ cimport matrix_sparse
+ 
+-include '../modules/vector_modn_sparse_h.pxi'
++include 'sage/modules/vector_modn_sparse_h.pxi'
+ 
+ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):   
+     cdef c_vector_modint* rows
+diff --git a/sage/matrix/matrix_modn_sparse.pyx b/sage/matrix/matrix_modn_sparse.pyx
+--- a/sage/matrix/matrix_modn_sparse.pyx
++++ b/sage/matrix/matrix_modn_sparse.pyx
+@@ -74,10 +74,10 @@
+ #                  http://www.gnu.org/licenses/
+ #############################################################################
+ 
+-include "../ext/cdefs.pxi"
+-include '../ext/interrupt.pxi'
+-include '../ext/stdsage.pxi'
+-include '../modules/vector_modn_sparse_c.pxi'
++include "sage/ext/cdefs.pxi"
++include 'sage/ext/interrupt.pxi'
++include 'sage/ext/stdsage.pxi'
++include 'sage/modules/vector_modn_sparse_c.pxi'
+ from cpython.sequence cimport *
+ 
+ cimport matrix
+@@ -97,9 +97,9 @@
+ cimport sage.structure.element
+ from matrix_modn_dense cimport Matrix_modn_dense
+ 
+-include '../modules/binary_search.pxi'
+-include '../modules/vector_integer_sparse_h.pxi'
+-include '../modules/vector_integer_sparse_c.pxi'
++include 'sage/modules/binary_search.pxi'
++include 'sage/modules/vector_integer_sparse_h.pxi'
++include 'sage/modules/vector_integer_sparse_c.pxi'
+ from matrix_integer_sparse cimport Matrix_integer_sparse
+ from sage.misc.decorators import rename_keyword
+ 
+diff --git a/sage/matrix/matrix_rational_dense.pxd b/sage/matrix/matrix_rational_dense.pxd
+--- a/sage/matrix/matrix_rational_dense.pxd
++++ b/sage/matrix/matrix_rational_dense.pxd
+@@ -1,4 +1,4 @@