diff --git a/src/sage/__init__.py b/src/sage/__init__.py new file mode 100644 index 00000000000..f6eb5289696 --- /dev/null +++ b/src/sage/__init__.py @@ -0,0 +1,2 @@ +# This is only here to mark the sage directory as a Python package +# (so that cython determines the correct module name) diff --git a/src/sage/algebras/__init__.py b/src/sage/algebras/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/finite_dimensional_algebras/__init__.py b/src/sage/algebras/finite_dimensional_algebras/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/finite_dimensional_algebras/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/fusion_rings/__init__.py b/src/sage/algebras/fusion_rings/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/fusion_rings/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/hecke_algebras/__init__.py b/src/sage/algebras/hecke_algebras/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/hecke_algebras/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/letterplace/__init__.py b/src/sage/algebras/letterplace/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/letterplace/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/lie_algebras/__init__.py b/src/sage/algebras/lie_algebras/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/lie_algebras/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/lie_conformal_algebras/__init__.py b/src/sage/algebras/lie_conformal_algebras/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/lie_conformal_algebras/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/quantum_groups/__init__.py b/src/sage/algebras/quantum_groups/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/quantum_groups/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/quatalg/__init__.py b/src/sage/algebras/quatalg/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/quatalg/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/algebras/steenrod/__init__.py b/src/sage/algebras/steenrod/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/algebras/steenrod/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/arith/__init__.py b/src/sage/arith/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/arith/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/calculus/__init__.py b/src/sage/calculus/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/calculus/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/calculus/transforms/__init__.py b/src/sage/calculus/transforms/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/calculus/transforms/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/categories/__init__.py b/src/sage/categories/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/categories/examples/__init__.py b/src/sage/categories/examples/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/categories/examples/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/coding/__init__.py b/src/sage/coding/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/coding/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/coding/codecan/__init__.py b/src/sage/coding/codecan/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/coding/codecan/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/coding/guruswami_sudan/__init__.py b/src/sage/coding/guruswami_sudan/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/coding/guruswami_sudan/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/coding/source_coding/__init__.py b/src/sage/coding/source_coding/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/coding/source_coding/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/__init__.py b/src/sage/combinat/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/chas/__init__.py b/src/sage/combinat/chas/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/chas/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/cluster_algebra_quiver/__init__.py b/src/sage/combinat/cluster_algebra_quiver/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/cluster_algebra_quiver/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/crystals/__init__.py b/src/sage/combinat/crystals/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/crystals/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/designs/__init__.py b/src/sage/combinat/designs/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/designs/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/matrices/__init__.py b/src/sage/combinat/matrices/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/matrices/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/ncsf_qsym/__init__.py b/src/sage/combinat/ncsf_qsym/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/ncsf_qsym/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/ncsym/__init__.py b/src/sage/combinat/ncsym/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/ncsym/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/path_tableaux/__init__.py b/src/sage/combinat/path_tableaux/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/path_tableaux/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/posets/__init__.py b/src/sage/combinat/posets/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/posets/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/rigged_configurations/__init__.py b/src/sage/combinat/rigged_configurations/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/rigged_configurations/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/root_system/__init__.py b/src/sage/combinat/root_system/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/root_system/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/sf/__init__.py b/src/sage/combinat/sf/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/sf/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/species/__init__.py b/src/sage/combinat/species/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/species/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/combinat/words/__init__.py b/src/sage/combinat/words/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/combinat/words/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/crypto/block_cipher/__init__.py b/src/sage/crypto/block_cipher/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/crypto/block_cipher/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/crypto/public_key/__init__.py b/src/sage/crypto/public_key/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/crypto/public_key/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/data_structures/__init__.py b/src/sage/data_structures/__init__.py new file mode 100644 index 00000000000..a347df6f046 --- /dev/null +++ b/src/sage/data_structures/__init__.py @@ -0,0 +1 @@ +# So that cython creates the correct module names diff --git a/src/sage/databases/__init__.py b/src/sage/databases/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/databases/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/dynamics/__init__.py b/src/sage/dynamics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/dynamics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/dynamics/arithmetic_dynamics/__init__.py b/src/sage/dynamics/arithmetic_dynamics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/dynamics/arithmetic_dynamics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/dynamics/cellular_automata/__init__.py b/src/sage/dynamics/cellular_automata/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/dynamics/cellular_automata/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/dynamics/complex_dynamics/__init__.py b/src/sage/dynamics/complex_dynamics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/dynamics/complex_dynamics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/ext/__init__.py b/src/sage/ext/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/ext/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/functions/__init__.py b/src/sage/functions/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/functions/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/game_theory/__init__.py b/src/sage/game_theory/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/game_theory/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/games/__init__.py b/src/sage/games/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/games/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/__init__.py b/src/sage/geometry/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/hyperbolic_space/__init__.py b/src/sage/geometry/hyperbolic_space/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/hyperbolic_space/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/hyperplane_arrangement/__init__.py b/src/sage/geometry/hyperplane_arrangement/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/hyperplane_arrangement/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/polyhedron/__init__.py b/src/sage/geometry/polyhedron/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/polyhedron/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/__init__.py b/src/sage/geometry/polyhedron/combinatorial_polyhedron/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/polyhedron/modules/__init__.py b/src/sage/geometry/polyhedron/modules/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/polyhedron/modules/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/riemannian_manifolds/__init__.py b/src/sage/geometry/riemannian_manifolds/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/riemannian_manifolds/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/geometry/triangulation/__init__.py b/src/sage/geometry/triangulation/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/geometry/triangulation/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/graphs/__init__.py b/src/sage/graphs/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/graphs/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/graphs/base/__init__.py b/src/sage/graphs/base/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/graphs/base/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/graphs/generators/__init__.py b/src/sage/graphs/generators/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/graphs/generators/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/graphs/graph_decompositions/__init__.py b/src/sage/graphs/graph_decompositions/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/graphs/graph_decompositions/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/__init__.py b/src/sage/groups/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/abelian_gps/__init__.py b/src/sage/groups/abelian_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/abelian_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/additive_abelian/__init__.py b/src/sage/groups/additive_abelian/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/additive_abelian/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/affine_gps/__init__.py b/src/sage/groups/affine_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/affine_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/lie_gps/__init__.py b/src/sage/groups/lie_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/lie_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/matrix_gps/__init__.py b/src/sage/groups/matrix_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/matrix_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/misc_gps/__init__.py b/src/sage/groups/misc_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/misc_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/perm_gps/__init__.py b/src/sage/groups/perm_gps/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/perm_gps/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/perm_gps/partn_ref/__init__.py b/src/sage/groups/perm_gps/partn_ref/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/perm_gps/partn_ref/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/perm_gps/partn_ref2/__init__.py b/src/sage/groups/perm_gps/partn_ref2/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/perm_gps/partn_ref2/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/groups/semimonomial_transformations/__init__.py b/src/sage/groups/semimonomial_transformations/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/groups/semimonomial_transformations/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/homology/__init__.py b/src/sage/homology/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/homology/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/interacts/__init__.py b/src/sage/interacts/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/interacts/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/interfaces/__init__.py b/src/sage/interfaces/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/interfaces/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/knots/__init__.py b/src/sage/knots/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/knots/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/lfunctions/__init__.py b/src/sage/lfunctions/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/lfunctions/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/__init__.py b/src/sage/libs/__init__.py new file mode 100644 index 00000000000..aa2a2b00341 --- /dev/null +++ b/src/sage/libs/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/gap/__init__.py b/src/sage/libs/gap/__init__.py new file mode 100644 index 00000000000..aa2a2b00341 --- /dev/null +++ b/src/sage/libs/gap/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/mpc/__init__.py b/src/sage/libs/mpc/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/libs/mpc/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/mpfi/__init__.py b/src/sage/libs/mpfi/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/libs/mpfi/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/mpfr/__init__.py b/src/sage/libs/mpfr/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/libs/mpfr/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/libs/polybori/__init__.py b/src/sage/libs/polybori/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/libs/polybori/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/logic/__init__.py b/src/sage/logic/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/logic/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/manifolds/__init__.py b/src/sage/manifolds/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/manifolds/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/manifolds/differentiable/__init__.py b/src/sage/manifolds/differentiable/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/manifolds/differentiable/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/manifolds/differentiable/examples/__init__.py b/src/sage/manifolds/differentiable/examples/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/manifolds/differentiable/examples/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/manifolds/subsets/__init__.py b/src/sage/manifolds/subsets/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/manifolds/subsets/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/matrix/__init__.py b/src/sage/matrix/__init__.py new file mode 100644 index 00000000000..165aea9af28 --- /dev/null +++ b/src/sage/matrix/__init__.py @@ -0,0 +1 @@ +# Because of relative imports diff --git a/src/sage/matroids/__init__.py b/src/sage/matroids/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/matroids/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/misc/__init__.py b/src/sage/misc/__init__.py new file mode 100644 index 00000000000..aa2a2b00341 --- /dev/null +++ b/src/sage/misc/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 8bcbb141ce9..fcf026f9392 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -22,16 +22,14 @@ import builtins import os import re -import sys import shutil +import sys -from sage.env import (SAGE_LOCAL, cython_aliases, - sage_include_directories) +from sage.env import SAGE_LOCAL, cython_aliases, sage_include_directories +from sage.misc.cachefunc import cached_function +from sage.misc.sage_ostools import redirection, restore_cwd from sage.misc.temporary_file import spyx_tmp, tmp_filename from sage.repl.user_globals import get_globals -from sage.misc.sage_ostools import restore_cwd, redirection -from sage.cpython.string import str_to_bytes -from sage.misc.cachefunc import cached_function @cached_function @@ -227,16 +225,13 @@ def cython(filename, verbose=0, compile_message=False, ....: ''') In Cython 0.29.33 using `from PACKAGE cimport MODULE` is broken - when `PACKAGE` is a namespace package, see :issue:`35322`:: + when `PACKAGE` is a namespace package, see :issue:`35322` + (but as of now sage.misc is not a namespace package, so this passes):: sage: cython(''' ....: from sage.misc cimport cachefunc ....: ''') - Traceback (most recent call last): - ... - RuntimeError: Error compiling Cython file: - ... - ...: 'sage/misc.pxd' not found + """ if not filename.endswith('pyx'): print("Warning: file (={}) should have extension .pyx".format(filename), file=sys.stderr) @@ -318,9 +313,9 @@ def cython(filename, verbose=0, compile_message=False, includes = [os.getcwd()] + standard_includes # Now do the actual build, directly calling Cython and distutils + import Cython.Compiler.Options from Cython.Build import cythonize from Cython.Compiler.Errors import CompileError - import Cython.Compiler.Options try: from setuptools.dist import Distribution @@ -328,8 +323,8 @@ def cython(filename, verbose=0, compile_message=False, except ImportError: # Fall back to distutils (stdlib); note that it is deprecated # in Python 3.10, 3.11; https://www.python.org/dev/peps/pep-0632/ - from distutils.dist import Distribution from distutils.core import Extension + from distutils.dist import Distribution from distutils.log import set_verbosity set_verbosity(verbose) diff --git a/src/sage/modular/__init__.py b/src/sage/modular/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/abvar/__init__.py b/src/sage/modular/abvar/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/abvar/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/arithgroup/__init__.py b/src/sage/modular/arithgroup/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/arithgroup/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/btquotients/__init__.py b/src/sage/modular/btquotients/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/btquotients/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/hecke/__init__.py b/src/sage/modular/hecke/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/hecke/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/local_comp/__init__.py b/src/sage/modular/local_comp/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/local_comp/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/modform/__init__.py b/src/sage/modular/modform/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/modform/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/modform_hecketriangle/__init__.py b/src/sage/modular/modform_hecketriangle/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/modform_hecketriangle/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/modsym/__init__.py b/src/sage/modular/modsym/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/modsym/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/overconvergent/__init__.py b/src/sage/modular/overconvergent/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/overconvergent/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/pollack_stevens/__init__.py b/src/sage/modular/pollack_stevens/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/pollack_stevens/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/quasimodform/__init__.py b/src/sage/modular/quasimodform/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/quasimodform/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/quatalg/__init__.py b/src/sage/modular/quatalg/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/quatalg/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modular/ssmod/__init__.py b/src/sage/modular/ssmod/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modular/ssmod/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modules/__init__.py b/src/sage/modules/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modules/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modules/fg_pid/__init__.py b/src/sage/modules/fg_pid/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modules/fg_pid/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modules/fp_graded/__init__.py b/src/sage/modules/fp_graded/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modules/fp_graded/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modules/fp_graded/steenrod/__init__.py b/src/sage/modules/fp_graded/steenrod/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modules/fp_graded/steenrod/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/modules/with_basis/__init__.py b/src/sage/modules/with_basis/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/modules/with_basis/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/monoids/__init__.py b/src/sage/monoids/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/monoids/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/numerical/__init__.py b/src/sage/numerical/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/numerical/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/numerical/backends/__init__.py b/src/sage/numerical/backends/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/numerical/backends/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/parallel/__init__.py b/src/sage/parallel/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/parallel/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/plot/__init__.py b/src/sage/plot/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/plot/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/plot/plot3d/__init__.py b/src/sage/plot/plot3d/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/plot/plot3d/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/probability/__init__.py b/src/sage/probability/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/probability/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/quadratic_forms/__init__.py b/src/sage/quadratic_forms/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/quadratic_forms/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/quadratic_forms/genera/__init__.py b/src/sage/quadratic_forms/genera/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/quadratic_forms/genera/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/quivers/__init__.py b/src/sage/quivers/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/quivers/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/__init__.py b/src/sage/rings/__init__.py new file mode 100644 index 00000000000..5ef917c1263 --- /dev/null +++ b/src/sage/rings/__init__.py @@ -0,0 +1 @@ +# To make cython create the correct module name diff --git a/src/sage/rings/asymptotic/__init__.py b/src/sage/rings/asymptotic/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/asymptotic/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/convert/__init__.py b/src/sage/rings/convert/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/convert/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/finite_rings/__init__.py b/src/sage/rings/finite_rings/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/finite_rings/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/function_field/__init__.py b/src/sage/rings/function_field/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/function_field/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/function_field/drinfeld_modules/__init__.py b/src/sage/rings/function_field/drinfeld_modules/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/invariants/__init__.py b/src/sage/rings/invariants/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/invariants/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/number_field/__init__.py b/src/sage/rings/number_field/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/number_field/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/padics/__init__.py b/src/sage/rings/padics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/padics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/polynomial/__init__.py b/src/sage/rings/polynomial/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/polynomial/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/polynomial/padics/__init__.py b/src/sage/rings/polynomial/padics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/polynomial/padics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/polynomial/weil/__init__.py b/src/sage/rings/polynomial/weil/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/polynomial/weil/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/semirings/__init__.py b/src/sage/rings/semirings/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/semirings/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/rings/valuation/__init__.py b/src/sage/rings/valuation/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/rings/valuation/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/sandpiles/__init__.py b/src/sage/sandpiles/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/sandpiles/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/sat/__init__.py b/src/sage/sat/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/sat/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/__init__.py b/src/sage/schemes/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/affine/__init__.py b/src/sage/schemes/affine/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/affine/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/berkovich/__init__.py b/src/sage/schemes/berkovich/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/berkovich/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/curves/__init__.py b/src/sage/schemes/curves/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/curves/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/cyclic_covers/__init__.py b/src/sage/schemes/cyclic_covers/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/cyclic_covers/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/elliptic_curves/__init__.py b/src/sage/schemes/elliptic_curves/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/elliptic_curves/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/generic/__init__.py b/src/sage/schemes/generic/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/generic/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/hyperelliptic_curves/__init__.py b/src/sage/schemes/hyperelliptic_curves/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/hyperelliptic_curves/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/jacobians/__init__.py b/src/sage/schemes/jacobians/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/jacobians/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/plane_conics/__init__.py b/src/sage/schemes/plane_conics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/plane_conics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/plane_quartics/__init__.py b/src/sage/schemes/plane_quartics/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/plane_quartics/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/product_projective/__init__.py b/src/sage/schemes/product_projective/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/product_projective/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/projective/__init__.py b/src/sage/schemes/projective/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/projective/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/riemann_surfaces/__init__.py b/src/sage/schemes/riemann_surfaces/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/riemann_surfaces/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/toric/__init__.py b/src/sage/schemes/toric/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/toric/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/schemes/toric/sheaf/__init__.py b/src/sage/schemes/toric/sheaf/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/schemes/toric/sheaf/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/sets/__init__.py b/src/sage/sets/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/sets/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/stats/__init__.py b/src/sage/stats/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/stats/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/stats/distributions/__init__.py b/src/sage/stats/distributions/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/stats/distributions/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/stats/hmm/__init__.py b/src/sage/stats/hmm/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/stats/hmm/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/symbolic/__init__.py b/src/sage/symbolic/__init__.py new file mode 100644 index 00000000000..27875dc3de5 --- /dev/null +++ b/src/sage/symbolic/__init__.py @@ -0,0 +1 @@ +# here so that cython creates the correct module name diff --git a/src/sage/symbolic/integration/__init__.py b/src/sage/symbolic/integration/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/symbolic/integration/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/tensor/__init__.py b/src/sage/tensor/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/tensor/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/tensor/modules/__init__.py b/src/sage/tensor/modules/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/tensor/modules/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/tests/books/__init__.py b/src/sage/tests/books/__init__.py index e69de29bb2d..1b10e244496 100644 --- a/src/sage/tests/books/__init__.py +++ b/src/sage/tests/books/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/topology/__init__.py b/src/sage/topology/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/topology/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage/typeset/__init__.py b/src/sage/typeset/__init__.py new file mode 100644 index 00000000000..1b10e244496 --- /dev/null +++ b/src/sage/typeset/__init__.py @@ -0,0 +1 @@ +# Here so that cython creates the correct module name diff --git a/src/sage_setup/autogen/interpreters/__init__.py b/src/sage_setup/autogen/interpreters/__init__.py index 75096d06b80..87dae60bce7 100644 --- a/src/sage_setup/autogen/interpreters/__init__.py +++ b/src/sage_setup/autogen/interpreters/__init__.py @@ -226,11 +226,6 @@ def rebuild(dirname, force=False, interpreters=None, distribution=None): except OSError: if not os.path.isdir(dirname): raise - # Remove leftover file from before move to namespace packages - try: - os.remove(os.path.join(dirname, '__init__.py')) - except FileNotFoundError: - pass # Although multiple files are generated by this function, since # they are all generated at once it suffices to make sure if just diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py index 8762e08ad0f..327638221e6 100644 --- a/src/sage_setup/find.py +++ b/src/sage_setup/find.py @@ -341,6 +341,93 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, return data_files + +def installed_files_by_module(site_packages, modules=('sage',)): + """ + Find all currently installed files + + INPUT: + + - ``site_packages`` -- string. The root Python path where the Sage + library is being installed. If the path doesn't exist, returns + an empty dictionary. + + - ``modules`` -- list/tuple/iterable of strings (default: + ``('sage',)``). The top-level directory name(s) in + ``site_packages``. + + OUTPUT: + + A dictionary whose keys are module names (``'sage.module.foo'``) + and values are list of corresponding file names + ``['sage/module/foo.py', 'sage/module/foo.pyc']`` relative to + ``site_packages``. + + EXAMPLES:: + + sage: site_packages = os.path.dirname(os.path.dirname(os.path.dirname(sage.cpython.__file__))) + sage: from sage_setup.find import installed_files_by_module + sage: files_by_module = installed_files_by_module(site_packages) + sage: (f,) = files_by_module['sage.structure.sage_object']; f + 'sage/structure/sage_object...' + sage: (f1, f2) = sorted(files_by_module['sage.structure']) + sage: f1 + 'sage/structure/__init__.py' + sage: f2 + 'sage/structure/....pyc' + + This takes about 30ms with warm cache:: + + sage: timeit('installed_files_by_module(site_packages)', # random output + ....: number=1, repeat=1) + 1 loops, best of 1: 29.6 ms per loop + """ + + module_files = defaultdict(set) + module_exts = get_extensions() + + def add(module, filename, dirpath): + # Find the longest extension that matches the filename + best_ext = '' + + for ext in module_exts: + if filename.endswith(ext) and len(ext) > len(best_ext): + best_ext = ext + + if not best_ext: + return + + base = filename[:-len(best_ext)] + filename = os.path.join(dirpath, filename) + + if base != '__init__': + module += '.' + base + + module_files[module].add(filename) + + cache_filename = importlib.util.cache_from_source(filename) + if os.path.exists(cache_filename): + module_files[module].add(cache_filename) + + cwd = os.getcwd() + try: + os.chdir(site_packages) + except OSError: + return module_files + try: + for module in modules: + for dirpath, dirnames, filenames in os.walk(module): + module_dir = '.'.join(dirpath.split(os.path.sep)) + + if os.path.basename(dirpath) == '__pycache__': + continue + + for filename in filenames: + add(module_dir, filename, dirpath) + finally: + os.chdir(cwd) + return module_files + def get_extensions(type=None): """ diff --git a/src/tox.ini b/src/tox.ini index bd6e5da0546..bcfb1e10437 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -392,7 +392,9 @@ consider_namespace_packages = True source = sage concurrency = multiprocessing data_file = .coverage/.coverage -disable_warnings = no-data-collected +disable_warnings = + no-data-collected + module-not-measured [coverage:report] ignore_errors = True