Ticket #11377: trac_11377-build_module_listpy.patch

File trac_11377-build_module_listpy.patch, 19.8 KB (added by fbissey, 9 years ago)

patch to module_list.py

  • module_list.py

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1305856872 -43200
    # Node ID 4a494081f153b93bb973b3ce97d5f8463055a152
    # Parent  ee672d4d5c0c98a4869635c88636f806cd52420e
    #11377 scrubbing and putting some order in module_list.py. Not strictly necessary but nice.
    
    diff --git a/module_list.py b/module_list.py
    a b  
    1414    sys.exit(1)
    1515else:
    1616    SAGE_ROOT  = os.environ['SAGE_ROOT']
    17     SAGE_LOCAL = SAGE_ROOT + '/local/'
    18     SAGE_DEVEL = SAGE_ROOT + '/devel/'
    19     SAGE_INC = SAGE_LOCAL + 'include/'
     17    SAGE_LOCAL = SAGE_ROOT + '/local'
     18    SAGE_DEVEL = SAGE_ROOT + '/devel'
     19    SAGE_INC = SAGE_LOCAL + '/include/'
    2020
    2121
    2222#########################################################
     
    4545
    4646
    4747#########################################################
    48 ### Debian-related stuff
    49 #########################################################
    50 
    51 if os.environ.has_key('SAGE_DEBIAN'):
    52     debian_include_dirs=["/usr/include",
    53                          "/usr/include/cudd",
    54                          "/usr/include/eclib",
    55                          "/usr/include/FLINT",
    56                          "/usr/include/fplll",
    57                          "/usr/include/givaro",
    58                          "/usr/include/gmp++",
    59                          "/usr/include/gsl",
    60                          "/usr/include/linbox",
    61                          "/usr/include/NTL",
    62                          "/usr/include/numpy",
    63                          "/usr/include/pari",
    64                          "/usr/include/polybori",
    65                          "/usr/include/polybori/groebner",
    66                          "/usr/include/singular",
    67                          "/usr/include/singular/singular",
    68                          "/usr/include/symmetrica",
    69                          "/usr/include/zn_poly"]
    70     include_dirs = include_dirs + debian_include_dirs
    71 else:
    72     debian_include_dirs=[]
    73 
    74 #########################################################
    7548### Commonly used definitions
    7649#########################################################
    7750
     
    8053# timestamp of the numpy build.
    8154numpy_depends = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include/numpy/_numpyconfig.h']
    8255
    83 flint_depends = [SAGE_LOCAL + '/include/FLINT/flint.h']
    84 singular_depends = [SAGE_LOCAL + '/include/libsingular.h']
    85 ginac_depends = [SAGE_LOCAL + '/include/pynac/ginac.h']
     56flint_depends = [SAGE_INC + 'FLINT/flint.h']
     57singular_depends = [SAGE_INC + 'libsingular.h']
     58ginac_depends = [SAGE_INC + 'pynac/ginac.h']
    8659
    8760#########################################################
    8861### PolyBoRi defines
     
    12497               sources = ['sage/algebras/quatalg/quaternion_algebra_element.pyx'],
    12598               language='c++',
    12699               libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++", "ntl"],
    127                include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     100               include_dirs = [SAGE_INC + 'FLINT/'],
    128101               depends = flint_depends),
    129102
    130103    Extension('sage.algebras.quatalg.quaternion_algebra_cython',
     
    340313    Extension('sage.graphs.matchpoly',
    341314              sources = ['sage/graphs/matchpoly.pyx'],
    342315              libraries = ['gmp', 'flint'],
    343               include_dirs = [SAGE_ROOT + '/local/include/FLINT/'],
     316              include_dirs = [SAGE_INC + 'FLINT/'],
    344317              extra_compile_args = ['-std=c99'],
    345               depends = [SAGE_ROOT + "/local/include/FLINT/flint.h"]),
     318              depends = flint_depends),
    346319
    347320    Extension('sage.graphs.planarity',
    348321              sources = ['sage/graphs/planarity/graphColorVertices.c',
     
    527500    Extension('sage.libs.ecl',
    528501              sources = ["sage/libs/ecl.pyx"],
    529502              libraries = ["ecl"],
    530               include_dirs = [SAGE_ROOT+'/local/include/ecl/'],
    531               depends = [SAGE_ROOT + '/local/include/ecl/ecl.h']),
     503              include_dirs = [SAGE_INC + 'ecl/'],
     504              depends = [SAGE_INC + 'ecl/ecl.h']),
    532505
    533506    Extension('sage.libs.flint.flint',
    534507              sources = ["sage/libs/flint/flint.pyx"],
    535508              libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
    536               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     509              include_dirs = [SAGE_INC + 'FLINT/'],
    537510              extra_compile_args=["-std=c99", "-D_XPG6"],
    538511              depends = flint_depends),
    539512
    540513    Extension('sage.libs.flint.fmpz_poly',
    541514              sources = ["sage/libs/flint/fmpz_poly.pyx"],
    542515              libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
    543               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     516              include_dirs = [SAGE_INC + 'FLINT/'],
    544517              extra_compile_args=["-std=c99", "-D_XPG6"],
    545518              depends = flint_depends),
    546519   
     
    548521              sources = ['sage/libs/fplll/fplll.pyx'],
    549522              libraries = ['gmp', 'mpfr', 'stdc++', 'fplll'],
    550523              language="c++",
    551               include_dirs = [SAGE_ROOT +'/local/include/fplll'],
    552               depends = [SAGE_ROOT + "/local/include/fplll/fplll.h"]),
     524              include_dirs = [SAGE_INC + 'fplll'],
     525              depends = [SAGE_INC + "fplll/fplll.h"]),
    553526
    554527    Extension('sage.libs.linbox.linbox',
    555528              sources = ['sage/libs/linbox/linbox.pyx'],
     
    564537              sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
    565538              libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
    566539                           'Lfunction', 'stdc++'],
    567               include_dirs = [SAGE_ROOT + "/local/include/lcalc/"],
     540              include_dirs = [SAGE_INC + "lcalc/"],
    568541              extra_compile_args=["-O3", "-ffast-math"],
    569542              language = 'c++'),
    570543     
     
    573546    Extension('sage.libs.libecm',
    574547              sources = ['sage/libs/libecm.pyx'],
    575548              libraries = ['ecm', 'gmp'],
    576               depends = [SAGE_ROOT + "/local/include/ecm.h"]),
     549              depends = [SAGE_INC + "ecm.h"]),
    577550     
    578551    Extension('sage.libs.mwrank.mwrank',
    579552              sources = ["sage/libs/mwrank/mwrank.pyx",
     
    598571              sources = ['sage/libs/ppl.pyx', 'sage/libs/ppl_shim.cc'],
    599572              libraries = ['ppl', 'gmpxx', 'gmp', 'm'],
    600573              language="c++",
    601               depends = [SAGE_LOCAL + "/include/ppl.hh"]),
     574              depends = [SAGE_INC + "ppl.hh"]),
    602575
    603576    Extension('sage.libs.ratpoints',
    604577              sources = ["sage/libs/ratpoints.pyx"],
    605               depends = [SAGE_ROOT + '/local/include/ratpoints.h'],
     578              depends = [SAGE_INC + 'ratpoints.h'],
    606579              libraries = ["ratpoints", "gmp"]),
    607580   
    608581    Extension('sage.libs.singular.singular',
    609582              sources = ['sage/libs/singular/singular.pyx'],
    610583              libraries = ['m', 'readline', 'singular', 'givaro', 'ntl', 'gmpxx', 'gmp'],
    611584              language="c++",
    612               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     585              include_dirs = [SAGE_INC + 'singular'],
    613586              depends = singular_depends),
    614587   
    615588    Extension('sage.libs.singular.polynomial',
    616589              sources = ['sage/libs/singular/polynomial.pyx'],
    617590              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    618591              language="c++",
    619               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     592              include_dirs = [SAGE_INC + 'singular'],
    620593              depends = singular_depends),
    621594
    622595    Extension('sage.libs.singular.ring',
    623596              sources = ['sage/libs/singular/ring.pyx'],
    624597              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    625598              language="c++",
    626               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     599              include_dirs = [SAGE_INC + 'singular'],
    627600              depends = singular_depends),
    628601
    629602    Extension('sage.libs.singular.groebner_strategy',
    630603              sources = ['sage/libs/singular/groebner_strategy.pyx'],
    631604              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    632605              language="c++",
    633               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     606              include_dirs = [SAGE_INC + 'singular'],
    634607              depends = singular_depends),
    635608
    636609    Extension('sage.libs.singular.function',
    637610              sources = ['sage/libs/singular/function.pyx'],
    638611              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    639612              language="c++",
    640               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     613              include_dirs = [SAGE_INC +'singular'],
    641614              depends = singular_depends),
    642615
    643616    Extension('sage.libs.singular.option',
    644617              sources = ['sage/libs/singular/option.pyx'],
    645618              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    646619              language="c++",
    647               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     620              include_dirs = [SAGE_INC + 'singular'],
    648621              depends = singular_depends),
    649622
    650623    Extension('sage.libs.symmetrica.symmetrica',
    651624              sources = ["sage/libs/symmetrica/%s"%s for s in ["symmetrica.pyx"]],
    652625              include_dirs = ['/usr/include/malloc/'],
    653626              libraries = ["symmetrica"],
    654               depends = [SAGE_ROOT + "/local/include/symmetrica/def.h"]),
     627              depends = [SAGE_INC + "symmetrica/def.h"]),
    655628
    656629    Extension('sage.libs.mpmath.utils',
    657630              sources = ["sage/libs/mpmath/utils.pyx"],
     
    898871    Extension('sage.matrix.matrix_mod2_dense',
    899872              sources = ['sage/matrix/matrix_mod2_dense.pyx'],
    900873              libraries = ['gmp','m4ri', 'gd', 'png12', 'z'],
    901               depends = [SAGE_ROOT + "/local/include/png.h", SAGE_ROOT + "/local/include/m4ri/m4ri.h"]),
     874              depends = [SAGE_INC + "png.h", SAGE_INC + "m4ri/m4ri.h"]),
    902875
    903876    Extension('sage.matrix.matrix_modn_dense',
    904877              sources = ['sage/matrix/matrix_modn_dense.pyx'],
     
    912885              sources = ['sage/matrix/matrix_mpolynomial_dense.pyx'],
    913886              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    914887              language="c++",
    915               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     888              include_dirs = [SAGE_INC + 'singular'],
    916889              depends = singular_depends),
    917890
    918891    #Extension('sage.matrix.matrix_pid_dense',
     
    10391012    Extension('sage.modular.modform.eis_series_cython',
    10401013              sources = ['sage/modular/modform/eis_series_cython.pyx'],
    10411014              libraries = ["gmp", "flint"],
    1042               include_dirs = [SAGE_ROOT + '/local/include/FLINT/'],
     1015              include_dirs = [SAGE_INC + 'FLINT/'],
    10431016              extra_compile_args = ['-std=c99'],
    10441017              depends = flint_depends),
    10451018
    10461019    Extension('sage.modular.modsym.apply',
    10471020              sources = ['sage/modular/modsym/apply.pyx'],
    10481021              libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
    1049               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1022              include_dirs = [SAGE_INC + 'FLINT/'],
    10501023              extra_compile_args=["-std=c99",  "-D_XPG6"],
    10511024              depends = flint_depends),
    10521025
     
    10561029    Extension('sage.modular.modsym.heilbronn',
    10571030              sources = ['sage/modular/modsym/heilbronn.pyx'],
    10581031              libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
    1059               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1032              include_dirs = [SAGE_INC + 'FLINT/'],
    10601033              extra_compile_args=["-std=c99", "-D_XPG6"],
    10611034              depends = flint_depends),
    10621035
     
    10991072    Extension('sage.modules.vector_mod2_dense',
    11001073              sources = ['sage/modules/vector_mod2_dense.pyx'],
    11011074              libraries = ['gmp','m4ri', 'png12', 'gd'],
    1102               depends = [SAGE_ROOT + "/local/include/png.h", SAGE_ROOT + "/local/include/m4ri/m4ri.h"]),
     1075              depends = [SAGE_INC + "png.h", SAGE_INC + "m4ri/m4ri.h"]),
    11031076   
    11041077    Extension('sage.modules.vector_rational_dense',
    11051078              sources = ['sage/modules/vector_rational_dense.pyx'],
     
    11241097
    11251098    Extension("sage.numerical.mip",
    11261099              ["sage/numerical/mip.pyx"],
    1127             include_dirs=["local/include/"],
    1128             libraries=["csage","stdc++"]),
     1100              include_dirs=[SAGE_INC],
     1101              libraries=["csage","stdc++"]),
    11291102
    11301103    Extension("sage.numerical.backends.generic_backend",
    11311104              ["sage/numerical/backends/generic_backend.pyx"],
    1132               include_dirs = [SAGE_ROOT+"/local/include/", "sage/c_lib/include/"],
     1105              include_dirs = [SAGE_INC, "sage/c_lib/include/"],
    11331106              libraries=["csage", "stdc++"]),
    11341107
    11351108    Extension("sage.numerical.backends.glpk_backend",
    11361109              ["sage/numerical/backends/glpk_backend.pyx"],
    1137               include_dirs = [SAGE_ROOT+"/local/include/", "sage/c_lib/include/"],
     1110              include_dirs = [SAGE_INC, "sage/c_lib/include/"],
    11381111              language = 'c++',
    11391112              libraries=["csage", "stdc++", "glpk", "gmp", "z"]),
    11401113
     
    12471220              sources = ['sage/rings/fraction_field_FpT.pyx'],
    12481221              libraries = ["csage", "flint", "gmp", "gmpxx", "ntl", "zn_poly"],
    12491222              extra_compile_args=["-std=c99", "-D_XPG6"],
    1250               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1223              include_dirs = [SAGE_INC + 'FLINT/'],
    12511224              depends = flint_depends),
    12521225   
    12531226    Extension('sage.rings.laurent_series_ring_element',
     
    14491422              sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'],
    14501423              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    14511424              language="c++",
    1452               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     1425              include_dirs = [SAGE_INC + 'singular'],
    14531426              depends = singular_depends),
    14541427
    14551428    Extension('sage.rings.polynomial.multi_polynomial_libsingular',
    14561429              sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'],
    14571430              libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
    14581431              language="c++",
    1459               include_dirs = [SAGE_ROOT +'/local/include/singular'],
     1432              include_dirs = [SAGE_INC + 'singular'],
    14601433              depends = singular_depends),
    14611434
    14621435    Extension('sage.rings.polynomial.multi_polynomial_ring_generic',
     
    14881461              sources = ['sage/rings/polynomial/polynomial_zmod_flint.pyx'],
    14891462              libraries = ["csage", "flint", "gmp", "gmpxx", "ntl", "zn_poly"],
    14901463              extra_compile_args=["-std=c99", "-D_XPG6"],
    1491               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1464              include_dirs = [SAGE_INC + 'FLINT/'],
    14921465              depends = flint_depends),
    14931466
    14941467    Extension('sage.rings.polynomial.polynomial_integer_dense_flint',
    14951468              sources = ['sage/rings/polynomial/polynomial_integer_dense_flint.pyx'],
    14961469              language = 'c++',
    14971470              libraries = ["csage", "flint", "ntl", "gmpxx", "gmp"],
    1498               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1471              include_dirs = [SAGE_INC + 'FLINT/'],
    14991472              depends = flint_depends),
    15001473
    15011474    Extension('sage.rings.polynomial.polynomial_integer_dense_ntl',
     
    15091482              language = 'c++',
    15101483              extra_compile_args=["-std=c99"] + uname_specific('SunOS', [], ['-D_XPG6']),
    15111484              libraries = ["csage", "flint", "ntl", "gmpxx", "gmp"],
    1512               include_dirs = [SAGE_ROOT + '/local/include/FLINT/', SAGE_ROOT + '/devel/sage/sage/libs/flint/'],
     1485              include_dirs = [SAGE_INC + 'FLINT/', 'sage/libs/flint/'],
    15131486              depends = flint_depends),
    15141487
    15151488    Extension('sage.rings.polynomial.polynomial_modn_dense_ntl',
     
    15211494    Extension('sage.rings.polynomial.pbori',
    15221495              sources = ['sage/rings/polynomial/pbori.pyx'],
    15231496              libraries=(['polybori','pboriCudd', 'groebner', 'gd', 'png12', 'm4ri']),
    1524               include_dirs = [SAGE_ROOT+'/local/include/cudd',
    1525                               SAGE_ROOT+'/local/include/polybori',
    1526                               SAGE_ROOT+'/local/include/polybori/groebner',
     1497              include_dirs = [SAGE_INC + 'cudd',
     1498                              SAGE_INC + 'polybori',
     1499                              SAGE_INC + 'polybori/groebner',
    15271500                              "sage/libs/polybori"],
    1528               depends = [SAGE_ROOT + "/local/include/polybori/polybori.h"],
     1501              depends = [SAGE_INC + "polybori/polybori.h"],
    15291502              extra_compile_args = polybori_extra_compile_args,
    15301503              language = 'c++'),
    15311504
     
    15511524    Extension('sage.schemes.elliptic_curves.descent_two_isogeny',
    15521525              sources = ['sage/schemes/elliptic_curves/descent_two_isogeny.pyx'],
    15531526              extra_compile_args=["-std=c99"],
    1554               depends = [SAGE_ROOT + '/local/include/ratpoints.h',
    1555                          SAGE_ROOT + '/local/include/gmp.h',
    1556                          SAGE_ROOT + '/local/include/FLINT/flint.h'],
    1557               include_dirs = [SAGE_ROOT+'/local/include/FLINT/'],
     1527              depends = [SAGE_INC + 'ratpoints.h',
     1528                         SAGE_INC + 'gmp.h'] +
     1529                         flint_depends,
     1530              include_dirs = [SAGE_INC + 'FLINT/'],
    15581531              libraries = ['flint', 'gmp', 'ratpoints']),
    15591532
    15601533    Extension('sage.schemes.generic.toric_divisor_class',
     
    17141687from sage.misc.package import is_package_installed
    17151688
    17161689
    1717 if (os.path.isfile(SAGE_ROOT+"/local/include/cplex.h") and                                                                                                                                                                                   
    1718     os.path.isfile(SAGE_ROOT+"/local/lib/libcplex.a")):
     1690if (os.path.isfile(SAGE_INC + "cplex.h") and                                                                                                                                                                                   
     1691    os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")):
    17191692    ext_modules.append(
    17201693        Extension("sage.numerical.backends.cplex_backend",                                                                                                                                                                                   
    17211694                  ["sage/numerical/backends/cplex_backend.pyx"],                                                                                                                                                                             
    1722                   include_dirs = [SAGE_ROOT+"/local/include/","/sage/c_lib/include/"],                                                                                                                                                       
     1695                  include_dirs = [SAGE_INC, "sage/c_lib/include/"],                                                                                                                                                       
    17231696                  language = 'c',                                                                                                                                                                                                             
    17241697                  libraries = ["csage", "stdc++", "cplex"])
    17251698        )
     
    17281701    ext_modules.append(
    17291702        Extension("sage.numerical.backends.coin_backend",                                                                                                                                                                                     
    17301703                  ["sage/numerical/backends/coin_backend.pyx"],
    1731                   include_dirs = [SAGE_ROOT+"/local/include/","sage/c_lib/include/"],
     1704                  include_dirs = [SAGE_INC, "sage/c_lib/include/"],
    17321705                  language = 'c++',
    17331706                  libraries = ["csage", "stdc++", "Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils", "OsiCbc", "OsiClp", "Osi", "OsiVol", "Vol"])
    17341707        )