Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/module_list.py
2609 views
1
#!/usr/bin/env python
2
3
import os, sys
4
from distutils.core import setup
5
from distutils.extension import Extension
6
7
8
#########################################################
9
### Configure SAGE_ROOT
10
#########################################################
11
12
if not os.environ.has_key('SAGE_ROOT'):
13
print " ERROR: The environment variable SAGE_ROOT must be defined."
14
sys.exit(1)
15
else:
16
SAGE_ROOT = os.environ['SAGE_ROOT']
17
SAGE_LOCAL = SAGE_ROOT + '/local'
18
SAGE_DEVEL = SAGE_ROOT + '/devel'
19
SAGE_INC = SAGE_LOCAL + '/include/'
20
21
22
#########################################################
23
### BLAS setup
24
#########################################################
25
26
## Choose cblas library -- note -- make sure to update sage/misc/cython.py
27
## if you change this!!
28
if os.environ.has_key('SAGE_BLAS'):
29
BLAS=os.environ['SAGE_BLAS']
30
BLAS2=os.environ['SAGE_BLAS']
31
elif os.path.exists('%s/lib/libatlas.so'%os.environ['SAGE_LOCAL']):
32
BLAS='cblas'
33
BLAS2='atlas'
34
elif os.path.exists('/usr/lib/libcblas.dylib') or \
35
os.path.exists('/usr/lib/libcblas.so'):
36
BLAS='cblas'
37
BLAS2='atlas'
38
elif os.path.exists('/usr/lib/libblas.dll.a'):
39
BLAS='gslcblas'
40
BLAS2='gslcblas'
41
else:
42
# This is very slow (?), but *guaranteed* to be available.
43
BLAS='gslcblas'
44
BLAS2='gslcblas'
45
46
47
#########################################################
48
### Commonly used definitions
49
#########################################################
50
51
numpy_include_dirs = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include']
52
# We pick a file from numpy which is autogenerated so it has the
53
# timestamp of the numpy build.
54
numpy_depends = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include/numpy/_numpyconfig.h']
55
56
flint_depends = [SAGE_INC + 'FLINT/flint.h']
57
singular_depends = [SAGE_INC + 'libsingular.h', SAGE_INC + 'givaro/givconfig.h']
58
ginac_depends = [SAGE_INC + 'pynac/ginac.h']
59
60
#########################################################
61
### M4RI flags
62
#########################################################
63
64
import ast
65
m4ri_extra_compile_args = []
66
for line in open(SAGE_INC + "m4ri/m4ri_config.h"):
67
if not line.startswith("#define __M4RI_SIMD_CFLAGS"):
68
continue
69
m4ri_sse2_cflags = ast.literal_eval(line[len("#define __M4RI_SIMD_CFLAGS"):].strip())
70
m4ri_extra_compile_args = [flag.strip() for flag in m4ri_sse2_cflags.split(" ") if flag.strip()]
71
break
72
73
singular_libs = ['m', 'readline', 'singular', 'givaro', 'ntl', 'gmpxx', 'gmp']
74
75
#########################################################
76
### PolyBoRi defines
77
#########################################################
78
79
polybori_extra_compile_args = []
80
for line in open(SAGE_LOCAL + "/share/polybori/flags.conf"):
81
if not line.startswith("CPPDEFINES"):
82
continue
83
polybori_extra_compile_args = ["-D"+e for e in ast.literal_eval(line[len("CPPDEFINES = "):])]
84
break
85
86
87
#############################################################
88
### List of modules
89
###
90
### Note that the list of modules is sorted alphabetically
91
### by extension name. Please keep this list sorted when
92
### adding new modules!
93
###
94
#############################################################
95
96
def uname_specific(name, value, alternative):
97
if name in os.uname()[0]:
98
return value
99
else:
100
return alternative
101
102
ext_modules = [
103
104
################################
105
##
106
## sage.algebras
107
##
108
################################
109
110
Extension('sage.algebras.quatalg.quaternion_algebra_element',
111
sources = ['sage/algebras/quatalg/quaternion_algebra_element.pyx'],
112
language='c++',
113
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++", "ntl"],
114
include_dirs = [SAGE_INC + 'FLINT/'],
115
depends = flint_depends),
116
117
Extension('sage.algebras.quatalg.quaternion_algebra_cython',
118
sources = ['sage/algebras/quatalg/quaternion_algebra_cython.pyx'],
119
language='c++',
120
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++", "ntl"]),
121
122
################################
123
##
124
## sage.calculus
125
##
126
################################
127
128
Extension('sage.calculus.var',
129
sources = ['sage/calculus/var.pyx']),
130
131
Extension('sage.calculus.riemann',
132
sources = ['sage/calculus/riemann.pyx'],
133
include_dirs = numpy_include_dirs,
134
depends = numpy_depends),
135
136
Extension('sage.calculus.interpolators',
137
sources = ['sage/calculus/interpolators.pyx'],
138
include_dirs = numpy_include_dirs,
139
depends = numpy_depends),
140
141
142
################################
143
##
144
## sage.categories
145
##
146
################################
147
148
Extension('sage.categories.action',
149
sources = ['sage/categories/action.pyx']),
150
151
Extension('sage.categories.category_singleton',
152
sources = ['sage/categories/category_singleton.pyx']),
153
154
Extension('sage.categories.functor',
155
sources = ['sage/categories/functor.pyx']),
156
157
Extension('sage.categories.map',
158
sources = ['sage/categories/map.pyx']),
159
160
Extension('sage.categories.morphism',
161
sources = ['sage/categories/morphism.pyx']),
162
163
Extension('sage.categories.examples.semigroups_cython',
164
sources = ['sage/categories/examples/semigroups_cython.pyx']),
165
166
################################
167
##
168
## sage.coding
169
##
170
################################
171
172
Extension('sage.coding.binary_code',
173
sources = ['sage/coding/binary_code.pyx']),
174
175
################################
176
##
177
## sage.combinat
178
##
179
################################
180
181
Extension('sage.combinat.expnums',
182
sources = ['sage/combinat/expnums.pyx'],
183
libraries = ['gmp']),
184
185
Extension('sage.combinat.matrices.dancing_links',
186
sources = ['sage/combinat/matrices/dancing_links.pyx'],
187
libraries = ["stdc++"],
188
language='c++'),
189
190
Extension('sage.structure.list_clone',
191
sources=['sage/structure/list_clone.pyx']),
192
193
Extension('sage.structure.list_clone_timings_cy',
194
sources=['sage/structure/list_clone_timings_cy.pyx']),
195
196
Extension('sage.sets.finite_set_map_cy',
197
sources=['sage/sets/finite_set_map_cy.pyx']),
198
199
Extension('sage.combinat.partitions',
200
sources = ['sage/combinat/partitions.pyx',
201
'sage/combinat/partitions_c.cc'],
202
libraries = ['gmp', 'mpfr'],
203
depends = ['sage/combinat/partitions_c.h'],
204
language='c++'),
205
206
Extension('sage.combinat.words.word_datatypes',
207
sources=['sage/combinat/words/word_datatypes.pyx'],
208
include_dirs = ['sage/combinat/words'],
209
libraries = ['stdc++'],
210
language='c++'),
211
212
Extension('sage.combinat.permutation_cython',
213
sources=['sage/combinat/permutation_cython.pyx']),
214
215
Extension('sage.combinat.dict_addition',
216
sources=['sage/combinat/dict_addition.pyx']),
217
218
Extension('sage.combinat.debruijn_sequence',
219
sources=['sage/combinat/debruijn_sequence.pyx']),
220
221
Extension('sage.combinat.degree_sequences',
222
sources = ['sage/combinat/degree_sequences.pyx']),
223
224
Extension('sage.combinat.combinat_cython',
225
sources=['sage/combinat/combinat_cython.pyx'],
226
libraries=['gmp']),
227
228
Extension('sage.combinat.enumeration_mod_permgroup',
229
sources=['sage/combinat/enumeration_mod_permgroup.pyx']),
230
231
################################
232
##
233
## sage.crypto
234
##
235
################################
236
237
Extension('sage.crypto.boolean_function',
238
sources = ['sage/crypto/boolean_function.pyx']),
239
240
################################
241
##
242
## sage.ext
243
##
244
################################
245
246
Extension('sage.ext.c_lib',
247
sources = ['sage/ext/c_lib.pyx']),
248
249
Extension('sage.ext.fast_callable',
250
sources = ['sage/ext/fast_callable.pyx']),
251
252
Extension('sage.ext.fast_eval',
253
sources = ['sage/ext/fast_eval.pyx']),
254
255
Extension('sage.ext.interactive_constructors_c',
256
sources = ['sage/ext/interactive_constructors_c.pyx']),
257
258
Extension('sage.ext.multi_modular',
259
sources = ['sage/ext/multi_modular.pyx'],
260
extra_compile_args = ['-std=c99'],
261
libraries=['gmp']),
262
263
################################
264
##
265
## sage.finance
266
##
267
################################
268
269
Extension('sage.finance.fractal',
270
sources = ['sage/finance/fractal.pyx'],
271
depends = numpy_depends),
272
273
Extension('sage.finance.markov_multifractal_cython',
274
sources = ['sage/finance/markov_multifractal_cython.pyx']),
275
276
Extension('sage.finance.time_series',
277
sources = ['sage/finance/time_series.pyx'],
278
include_dirs = numpy_include_dirs,
279
depends = numpy_depends),
280
281
282
################################
283
##
284
## sage.functions
285
##
286
################################
287
288
Extension('sage.functions.prime_pi',
289
sources = ['sage/functions/prime_pi.pyx']),
290
291
################################
292
##
293
## sage.games
294
##
295
################################
296
297
Extension('sage.games.sudoku_backtrack',
298
sources = ['sage/games/sudoku_backtrack.pyx']),
299
300
################################
301
##
302
## sage.geometry
303
##
304
################################
305
306
Extension('sage.geometry.point_collection',
307
sources = ['sage/geometry/point_collection.pyx']),
308
309
Extension('sage.geometry.toric_lattice_element',
310
sources = ['sage/geometry/toric_lattice_element.pyx'],
311
libraries=['gmp']),
312
313
Extension('sage.geometry.integral_points',
314
sources = ['sage/geometry/integral_points.pyx']),
315
316
Extension('sage.geometry.triangulation.base',
317
sources = ['sage/geometry/triangulation/functions.cc',
318
'sage/geometry/triangulation/data.cc',
319
'sage/geometry/triangulation/base.pyx',
320
'sage/geometry/triangulation/triangulations.cc'],
321
language="c++"),
322
323
################################
324
##
325
## sage.graphs
326
##
327
################################
328
329
Extension('sage.graphs.chrompoly',
330
sources = ['sage/graphs/chrompoly.pyx'],
331
libraries = ['gmp']),
332
333
Extension('sage.graphs.cliquer',
334
sources = ['sage/graphs/cliquer.pyx'],
335
libraries = ['cliquer']),
336
337
338
Extension('sage.graphs.graph_decompositions.vertex_separation',
339
sources = ['sage/graphs/graph_decompositions/vertex_separation.pyx']),
340
341
Extension('sage.graphs.convexity_properties',
342
sources = ['sage/graphs/convexity_properties.pyx']),
343
344
Extension('sage.graphs.comparability',
345
sources = ['sage/graphs/comparability.pyx']),
346
347
Extension('sage.graphs.generic_graph_pyx',
348
sources = ['sage/graphs/generic_graph_pyx.pyx'],
349
libraries = ['gmp']),
350
351
Extension('sage.graphs.graph_generators_pyx',
352
sources = ['sage/graphs/graph_generators_pyx.pyx']),
353
354
Extension('sage.graphs.distances_all_pairs',
355
sources = ['sage/graphs/distances_all_pairs.pyx']),
356
357
Extension('sage.graphs.base.static_sparse_graph',
358
sources = ['sage/graphs/base/static_sparse_graph.pyx']),
359
360
Extension('sage.graphs.modular_decomposition.modular_decomposition',
361
sources = ['sage/graphs/modular_decomposition/modular_decomposition.pyx'],
362
depends = ['sage/graphs/modular_decomposition/src/dm.c',
363
'sage/graphs/modular_decomposition/src/dm_english.h']),
364
365
Extension('sage.graphs.matchpoly',
366
sources = ['sage/graphs/matchpoly.pyx'],
367
libraries = ['gmp', 'flint'],
368
include_dirs = [SAGE_INC + 'FLINT/'],
369
extra_compile_args = ['-std=c99'],
370
depends = flint_depends),
371
372
Extension('sage.graphs.planarity',
373
sources = ['sage/graphs/planarity/graphColorVertices.c',
374
'sage/graphs/planarity/graphColorVertices_Extensions.c',
375
'sage/graphs/planarity/graphDrawPlanar.c',
376
'sage/graphs/planarity/graphDrawPlanar_Extensions.c',
377
'sage/graphs/planarity/graphEmbed.c',
378
'sage/graphs/planarity/graphExtensions.c',
379
'sage/graphs/planarity/graphIO.c',
380
'sage/graphs/planarity/graphIsolator.c',
381
'sage/graphs/planarity/graphK23Search.c',
382
'sage/graphs/planarity/graphK23Search_Extensions.c',
383
'sage/graphs/planarity/graphK33Search.c',
384
'sage/graphs/planarity/graphK33Search_Extensions.c',
385
'sage/graphs/planarity/graphK4Search.c',
386
'sage/graphs/planarity/graphK4Search_Extensions.c',
387
'sage/graphs/planarity/graphNonplanar.c',
388
'sage/graphs/planarity/graphOuterplanarObstruction.c',
389
'sage/graphs/planarity/graphPreprocess.c',
390
'sage/graphs/planarity/graphTests.c',
391
'sage/graphs/planarity/graphUtils.c',
392
'sage/graphs/planarity/listcoll.c',
393
'sage/graphs/planarity/planarity.c',
394
'sage/graphs/planarity/planarityCommandLine.c',
395
'sage/graphs/planarity/planarityRandomGraphs.c',
396
'sage/graphs/planarity/planaritySpecificGraph.c',
397
'sage/graphs/planarity/planarityUtils.c',
398
'sage/graphs/planarity/stack.c',
399
'sage/graphs/planarity.pyx'],
400
depends = ['sage/graphs/planarity/appconst.h',
401
'sage/graphs/planarity/graphColorVertices.h',
402
'sage/graphs/planarity/graphColorVertices.private.h',
403
'sage/graphs/planarity/graphDrawPlanar.h',
404
'sage/graphs/planarity/graphDrawPlanar.private.h',
405
'sage/graphs/planarity/graphExtensions.h',
406
'sage/graphs/planarity/graphExtensions.private.h',
407
'sage/graphs/planarity/graphFunctionTable.h',
408
'sage/graphs/planarity/graph.h',
409
'sage/graphs/planarity/graphK23Search.h',
410
'sage/graphs/planarity/graphK23Search.private.h',
411
'sage/graphs/planarity/graphK33Search.h',
412
'sage/graphs/planarity/graphK33Search.private.h',
413
'sage/graphs/planarity/graphK4Search.h',
414
'sage/graphs/planarity/graphK4Search.private.h',
415
'sage/graphs/planarity/graphStructures.h',
416
'sage/graphs/planarity/listcoll.h',
417
'sage/graphs/planarity/planarity.h',
418
'sage/graphs/planarity/platformTime.h',
419
'sage/graphs/planarity/stack.h']),
420
421
Extension('sage.graphs.graph_decompositions.rankwidth',
422
sources = ['sage/graphs/graph_decompositions/rankwidth.pyx']),
423
424
Extension('sage.graphs.spanning_tree',
425
sources = ['sage/graphs/spanning_tree.pyx']),
426
427
Extension('sage.graphs.trees',
428
sources = ['sage/graphs/trees.pyx']),
429
430
Extension('sage.graphs.genus',
431
sources = ['sage/graphs/genus.pyx']),
432
433
################################
434
##
435
## sage.graphs.base
436
##
437
################################
438
439
Extension('sage.graphs.base.c_graph',
440
sources = ['sage/graphs/base/c_graph.pyx']),
441
442
Extension('sage.graphs.base.sparse_graph',
443
sources = ['sage/graphs/base/sparse_graph.pyx']),
444
445
Extension('sage.graphs.base.dense_graph',
446
sources = ['sage/graphs/base/dense_graph.pyx']),
447
448
################################
449
##
450
## sage.groups
451
##
452
################################
453
454
Extension('sage.groups.group',
455
sources = ['sage/groups/group.pyx']),
456
457
Extension('sage.groups.perm_gps.permgroup_element',
458
sources = ['sage/groups/perm_gps/permgroup_element.pyx']),
459
460
###################################
461
##
462
## sage.groups.perm_gps.partn_ref
463
##
464
###################################
465
466
Extension('sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label',
467
sources = ['sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx'],
468
libraries = ['gmp', 'flint'],
469
include_dirs = [SAGE_INC + 'FLINT/'],
470
extra_compile_args = ['-std=c99'],
471
depends = flint_depends),
472
473
Extension('sage.groups.perm_gps.partn_ref.double_coset',
474
sources = ['sage/groups/perm_gps/partn_ref/double_coset.pyx'],
475
libraries = ['gmp', 'flint'],
476
include_dirs = [SAGE_INC + 'FLINT/'],
477
extra_compile_args = ['-std=c99'],
478
depends = flint_depends),
479
480
Extension('sage.groups.perm_gps.partn_ref.refinement_binary',
481
sources = ['sage/groups/perm_gps/partn_ref/refinement_binary.pyx'],
482
libraries = ['gmp', 'flint'],
483
include_dirs = [SAGE_INC + 'FLINT/'],
484
extra_compile_args = ['-std=c99'],
485
depends = flint_depends),
486
487
Extension('sage.groups.perm_gps.partn_ref.refinement_graphs',
488
sources = ['sage/groups/perm_gps/partn_ref/refinement_graphs.pyx'],
489
libraries = ['gmp', 'flint'],
490
include_dirs = [SAGE_INC + 'FLINT/'],
491
extra_compile_args = ['-std=c99'],
492
depends = flint_depends),
493
494
Extension('sage.groups.perm_gps.partn_ref.refinement_lists',
495
sources = ['sage/groups/perm_gps/partn_ref/refinement_lists.pyx'],
496
libraries = ['gmp', 'flint'],
497
include_dirs = [SAGE_INC + 'FLINT/'],
498
extra_compile_args = ['-std=c99'],
499
depends = flint_depends),
500
501
Extension('sage.groups.perm_gps.partn_ref.refinement_matrices',
502
sources = ['sage/groups/perm_gps/partn_ref/refinement_matrices.pyx'],
503
libraries = ['gmp', 'flint'],
504
include_dirs = [SAGE_INC + 'FLINT/'],
505
extra_compile_args = ['-std=c99'],
506
depends = flint_depends),
507
508
Extension('sage.groups.perm_gps.partn_ref.refinement_python',
509
sources = ['sage/groups/perm_gps/partn_ref/refinement_python.pyx'],
510
libraries = ['gmp', 'flint'],
511
include_dirs = [SAGE_INC + 'FLINT/'],
512
extra_compile_args = ['-std=c99'],
513
depends = flint_depends),
514
515
################################
516
##
517
## sage.gsl
518
##
519
################################
520
521
Extension('sage.gsl.callback',
522
sources = ['sage/gsl/callback.pyx'],
523
libraries = ['gsl', BLAS, BLAS2],
524
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
525
526
Extension('sage.gsl.dwt',
527
sources = ['sage/gsl/dwt.pyx'],
528
libraries=['gsl',BLAS],
529
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
530
531
Extension('sage.gsl.fft',
532
sources = ['sage/gsl/fft.pyx'],
533
libraries = ['gsl', BLAS, BLAS2],
534
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
535
536
Extension('sage.gsl.gsl_array',
537
sources = ['sage/gsl/gsl_array.pyx'],
538
libraries=['gsl', BLAS, BLAS2],
539
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
540
541
Extension('sage.gsl.integration',
542
sources = ['sage/gsl/integration.pyx'],
543
define_macros=[('GSL_DISABLE_DEPRECATED','1')],
544
libraries=['gsl',BLAS, BLAS2]),
545
546
Extension('sage.gsl.interpolation',
547
sources = ['sage/gsl/interpolation.pyx'],
548
libraries = ['gsl', BLAS, BLAS2],
549
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
550
551
Extension('sage.gsl.ode',
552
sources = ['sage/gsl/ode.pyx'],
553
libraries=['gsl',BLAS, BLAS2],
554
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
555
556
Extension('sage.gsl.probability_distribution',
557
sources = ['sage/gsl/probability_distribution.pyx'],
558
libraries=['gsl', BLAS, BLAS2],
559
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
560
561
################################
562
##
563
## sage.interacts
564
##
565
################################
566
567
Extension('sage.interacts.library_cython',
568
sources = ['sage/interacts/library_cython.pyx'],
569
libraries = []),
570
571
################################
572
##
573
## sage.libs
574
##
575
################################
576
577
Extension('sage.libs.ecl',
578
sources = ["sage/libs/ecl.pyx"],
579
libraries = ["ecl"],
580
include_dirs = [SAGE_INC + 'ecl/'],
581
depends = [SAGE_INC + 'ecl/ecl.h']),
582
583
Extension('sage.libs.flint.flint',
584
sources = ["sage/libs/flint/flint.pyx"],
585
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
586
include_dirs = [SAGE_INC + 'FLINT/'],
587
extra_compile_args=["-std=c99", "-D_XPG6"],
588
depends = flint_depends),
589
590
Extension('sage.libs.flint.fmpz_poly',
591
sources = ["sage/libs/flint/fmpz_poly.pyx"],
592
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
593
include_dirs = [SAGE_INC + 'FLINT/'],
594
extra_compile_args=["-std=c99", "-D_XPG6"],
595
depends = flint_depends),
596
597
Extension('sage.libs.fplll.fplll',
598
sources = ['sage/libs/fplll/fplll.pyx'],
599
libraries = ['gmp', 'mpfr', 'stdc++', 'fplll'],
600
language="c++",
601
include_dirs = [SAGE_INC + 'fplll'],
602
depends = [SAGE_INC + "fplll/fplll.h"]),
603
604
Extension('sage.libs.linbox.linbox',
605
sources = ['sage/libs/linbox/linbox.pyx'],
606
# For this to work on cygwin, linboxsage *must* be
607
# before ntl.
608
libraries = ['linboxsage', 'ntl', 'linbox',
609
'stdc++', 'givaro', 'gmp', 'gmpxx', BLAS, BLAS2],
610
language = 'c++',
611
depends = [SAGE_INC + 'givaro/givconfig.h']),
612
613
Extension('sage.libs.lcalc.lcalc_Lfunction',
614
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
615
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
616
'Lfunction', 'stdc++'],
617
include_dirs = [SAGE_INC + "lcalc/"],
618
extra_compile_args=["-O3", "-ffast-math"],
619
language = 'c++'),
620
621
622
623
Extension('sage.libs.libecm',
624
sources = ['sage/libs/libecm.pyx'],
625
libraries = ['ecm', 'gmp'],
626
extra_link_args = uname_specific("Linux", ["-Wl,-z,noexecstack"],
627
[]),
628
depends = [SAGE_INC + "ecm.h"]),
629
630
Extension('sage.libs.mwrank.mwrank',
631
sources = ["sage/libs/mwrank/mwrank.pyx",
632
"sage/libs/mwrank/wrap.cc"],
633
define_macros = [("NTL_ALL",None)],
634
depends = ["sage/libs/mwrank/wrap.h"] +
635
[ SAGE_INC + "eclib/" + h for h in
636
["curve.h","egr.h","descent.h","points.h","isogs.h",
637
"marith.h","htconst.h","interface.h"]
638
],
639
libraries = ["jc",
640
"ntl", "gmp", "gmpxx", "stdc++", "m", "pari"]),
641
# IMHO "pari" could be removed here, but some people
642
# claim it is needed on Cygwin (see #9896, #9914).
643
# If so, we should use uname_specific(). -leif
644
645
Extension('sage.libs.pari.gen',
646
sources = ["sage/libs/pari/gen.pyx"],
647
libraries = ['pari', 'gmp']),
648
649
Extension('sage.libs.ppl',
650
sources = ['sage/libs/ppl.pyx', 'sage/libs/ppl_shim.cc'],
651
libraries = ['ppl', 'gmpxx', 'gmp', 'm'],
652
language="c++",
653
depends = [SAGE_INC + "ppl.hh"]),
654
655
Extension('sage.libs.ratpoints',
656
sources = ["sage/libs/ratpoints.pyx"],
657
depends = [SAGE_INC + 'ratpoints.h'],
658
libraries = ["ratpoints", "gmp"]),
659
660
Extension('sage.libs.singular.singular',
661
sources = ['sage/libs/singular/singular.pyx'],
662
libraries = singular_libs,
663
language="c++",
664
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
665
depends = singular_depends),
666
667
Extension('sage.libs.singular.polynomial',
668
sources = ['sage/libs/singular/polynomial.pyx'],
669
libraries = singular_libs,
670
language="c++",
671
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
672
depends = singular_depends),
673
674
Extension('sage.libs.singular.ring',
675
sources = ['sage/libs/singular/ring.pyx'],
676
libraries = singular_libs,
677
language="c++",
678
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
679
depends = singular_depends),
680
681
Extension('sage.libs.singular.groebner_strategy',
682
sources = ['sage/libs/singular/groebner_strategy.pyx'],
683
libraries = singular_libs,
684
language="c++",
685
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
686
depends = singular_depends),
687
688
Extension('sage.libs.singular.function',
689
sources = ['sage/libs/singular/function.pyx'],
690
libraries = singular_libs,
691
language="c++",
692
include_dirs = [SAGE_INC +'singular', SAGE_INC + 'factory'],
693
depends = singular_depends),
694
695
Extension('sage.libs.singular.option',
696
sources = ['sage/libs/singular/option.pyx'],
697
libraries = singular_libs,
698
language="c++",
699
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
700
depends = singular_depends),
701
702
Extension('sage.libs.symmetrica.symmetrica',
703
sources = ["sage/libs/symmetrica/%s"%s for s in ["symmetrica.pyx"]],
704
include_dirs = ['/usr/include/malloc/'],
705
libraries = ["symmetrica"],
706
depends = [SAGE_INC + "symmetrica/def.h"]),
707
708
Extension('sage.libs.mpmath.utils',
709
sources = ["sage/libs/mpmath/utils.pyx"],
710
libraries = ['mpfr', 'gmp']),
711
712
Extension('sage.libs.mpmath.ext_impl',
713
sources = ["sage/libs/mpmath/ext_impl.pyx"],
714
libraries = ['mpfr', 'gmp']),
715
716
Extension('sage.libs.mpmath.ext_main',
717
sources = ["sage/libs/mpmath/ext_main.pyx"],
718
libraries = ['gmp']),
719
720
Extension('sage.libs.mpmath.ext_libmp',
721
sources = ["sage/libs/mpmath/ext_libmp.pyx"],
722
libraries = ['gmp']),
723
724
###################################
725
##
726
## sage.libs.cremona
727
##
728
###################################
729
730
Extension('sage.libs.cremona.homspace',
731
sources = ["sage/libs/cremona/homspace.pyx"],
732
libraries = ['jc', 'gmpxx', 'ntl', 'gmp',
733
'm', 'stdc++', 'pari'],
734
# IMHO "pari" could be removed here, but some people
735
# claim it is needed on Cygwin (see #9896, #9914).
736
# If so, we should use uname_specific(). -leif
737
language='c++',
738
define_macros = [("NTL_ALL",None)],
739
depends = [ SAGE_INC + "eclib/" + h for h in
740
["interface.h","bigrat.h","rat.h","curve.h",
741
"moddata.h","symb.h","cusp.h","homspace.h","mat.h"]
742
]),
743
744
Extension('sage.libs.cremona.mat',
745
sources = ["sage/libs/cremona/mat.pyx"],
746
libraries = ['jc', 'gmpxx', 'ntl',
747
'gmp', 'm', 'stdc++', ],
748
language='c++',
749
define_macros = [("NTL_ALL",None)],
750
depends = [ SAGE_INC + "eclib/" + h for h in
751
["interface.h","bigrat.h","rat.h","curve.h",
752
"moddata.h","symb.h","cusp.h","homspace.h","mat.h"]
753
]),
754
755
Extension('sage.libs.cremona.newforms',
756
sources = ["sage/libs/cremona/newforms.pyx"],
757
libraries = ['jc', 'gmpxx', 'ntl', 'gmp',
758
'm', 'stdc++', 'pari'],
759
# IMHO "pari" could be removed here, but some people
760
# claim it is needed on Cygwin (see #9896, #9914).
761
# If so, we should use uname_specific(). -leif
762
language='c++',
763
define_macros = [("NTL_ALL",None)],
764
depends = [ SAGE_INC + "eclib/" + h for h in
765
["interface.h","bigrat.h","rat.h","curve.h",
766
"moddata.h","symb.h","cusp.h","xsplit.h","method.h",
767
"oldforms.h","homspace.h","cperiods.h","newforms.h"]
768
]),
769
770
###################################
771
##
772
## sage.libs.ntl
773
##
774
###################################
775
776
# NOTE: It is *very* important (for cygwin) that csage be the
777
# first library listed for all ntl extensions below.
778
779
Extension('sage.libs.ntl.ntl_GF2',
780
sources = ["sage/libs/ntl/ntl_GF2.pyx"],
781
libraries = ["csage", "ntl", "gmp", "gmpxx", "stdc++"],
782
language='c++'),
783
784
Extension('sage.libs.ntl.ntl_GF2E',
785
sources = ["sage/libs/ntl/ntl_GF2E.pyx"],
786
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
787
language='c++'),
788
789
Extension('sage.libs.ntl.ntl_GF2EContext',
790
sources = ["sage/libs/ntl/ntl_GF2EContext.pyx"],
791
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
792
language='c++'),
793
794
Extension('sage.libs.ntl.ntl_GF2EX',
795
sources = ["sage/libs/ntl/ntl_GF2EX.pyx"],
796
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
797
language='c++'),
798
799
Extension('sage.libs.ntl.ntl_GF2X',
800
sources = ["sage/libs/ntl/ntl_GF2X.pyx"],
801
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
802
language='c++'),
803
804
Extension('sage.libs.ntl.ntl_lzz_p',
805
sources = ["sage/libs/ntl/ntl_lzz_p.pyx"],
806
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
807
language='c++'),
808
809
Extension('sage.libs.ntl.ntl_lzz_pContext',
810
sources = ["sage/libs/ntl/ntl_lzz_pContext.pyx"],
811
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
812
language='c++'),
813
814
Extension('sage.libs.ntl.ntl_lzz_pX',
815
sources = ["sage/libs/ntl/ntl_lzz_pX.pyx"],
816
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
817
language='c++'),
818
819
Extension('sage.libs.ntl.ntl_mat_GF2',
820
sources = ["sage/libs/ntl/ntl_mat_GF2.pyx"],
821
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
822
language='c++'),
823
824
Extension('sage.libs.ntl.ntl_mat_GF2E',
825
sources = ["sage/libs/ntl/ntl_mat_GF2E.pyx"],
826
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
827
language='c++'),
828
829
Extension('sage.libs.ntl.ntl_mat_ZZ',
830
sources = ["sage/libs/ntl/ntl_mat_ZZ.pyx"],
831
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
832
language='c++'),
833
834
Extension('sage.libs.ntl.ntl_ZZ',
835
sources = ["sage/libs/ntl/ntl_ZZ.pyx"],
836
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
837
language='c++'),
838
839
Extension('sage.libs.ntl.ntl_ZZX',
840
sources = ["sage/libs/ntl/ntl_ZZX.pyx"],
841
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
842
language='c++'),
843
844
Extension('sage.libs.ntl.ntl_ZZ_p',
845
sources = ["sage/libs/ntl/ntl_ZZ_p.pyx"],
846
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
847
language='c++'),
848
849
Extension('sage.libs.ntl.ntl_ZZ_pContext',
850
sources = ["sage/libs/ntl/ntl_ZZ_pContext.pyx"],
851
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
852
language='c++'),
853
854
Extension('sage.libs.ntl.ntl_ZZ_pE',
855
sources = ["sage/libs/ntl/ntl_ZZ_pE.pyx"],
856
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
857
language='c++'),
858
859
Extension('sage.libs.ntl.ntl_ZZ_pEContext',
860
sources = ["sage/libs/ntl/ntl_ZZ_pEContext.pyx"],
861
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
862
language='c++'),
863
864
Extension('sage.libs.ntl.ntl_ZZ_pEX',
865
sources = ["sage/libs/ntl/ntl_ZZ_pEX.pyx"],
866
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
867
language='c++'),
868
869
Extension('sage.libs.ntl.ntl_ZZ_pX',
870
sources = ["sage/libs/ntl/ntl_ZZ_pX.pyx"],
871
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
872
language='c++'),
873
874
################################
875
##
876
## sage.matrix
877
##
878
################################
879
880
Extension('sage.matrix.action',
881
sources = ['sage/matrix/action.pyx']),
882
883
Extension('sage.matrix.change_ring',
884
sources = ['sage/matrix/change_ring.pyx'],
885
libraries=[BLAS, BLAS2, 'gmp'],
886
include_dirs = numpy_include_dirs),
887
888
Extension('sage.matrix.matrix',
889
sources = ['sage/matrix/matrix.pyx']),
890
891
Extension('sage.matrix.matrix0',
892
sources = ['sage/matrix/matrix0.pyx']),
893
894
Extension('sage.matrix.matrix1',
895
sources = ['sage/matrix/matrix1.pyx'],
896
depends = numpy_depends),
897
898
Extension('sage.matrix.matrix2',
899
sources = ['sage/matrix/matrix2.pyx']),
900
901
Extension('sage.matrix.matrix_complex_double_dense',
902
sources = ['sage/matrix/matrix_complex_double_dense.pyx'],
903
libraries=[BLAS, BLAS2],
904
include_dirs = numpy_include_dirs,
905
depends = numpy_depends),
906
907
Extension('sage.matrix.matrix_cyclo_dense',
908
sources = ['sage/matrix/matrix_cyclo_dense.pyx'],
909
language = "c++",
910
libraries=['ntl', 'gmp']),
911
912
#Extension('sage.matrix.matrix_cyclo_sparse',
913
# sources = ['sage/matrix/matrix_cyclo_sparse.pyx']),
914
915
Extension('sage.matrix.matrix_dense',
916
sources = ['sage/matrix/matrix_dense.pyx']),
917
918
#Extension('sage.matrix.matrix_domain_dense',
919
# sources = ['sage/matrix/matrix_domain_dense.pyx']),
920
921
#Extension('sage.matrix.matrix_domain_sparse',
922
# sources = ['sage/matrix/matrix_domain_sparse.pyx']),
923
924
Extension('sage.matrix.matrix_double_dense',
925
sources = ['sage/matrix/matrix_double_dense.pyx'],
926
libraries=[BLAS, BLAS2],
927
include_dirs = numpy_include_dirs,
928
depends = numpy_depends),
929
930
Extension('sage.matrix.matrix_generic_dense',
931
sources = ['sage/matrix/matrix_generic_dense.pyx']),
932
933
Extension('sage.matrix.matrix_generic_sparse',
934
sources = ['sage/matrix/matrix_generic_sparse.pyx']),
935
936
Extension('sage.matrix.matrix_integer_2x2',
937
sources = ['sage/matrix/matrix_integer_2x2.pyx'],
938
libraries = ['gmp']),
939
940
# TODO -- change to use BLAS at some point.
941
Extension('sage.matrix.matrix_integer_dense',
942
sources = ['sage/matrix/matrix_integer_dense.pyx'],
943
extra_compile_args = ['-std=c99'] + m4ri_extra_compile_args,
944
depends = [SAGE_INC + 'm4ri/m4ri.h'],
945
# order matters for cygwin!!
946
libraries = ['iml', 'pari', 'm', 'gmp', BLAS, BLAS2]),
947
948
Extension('sage.matrix.matrix_integer_sparse',
949
sources = ['sage/matrix/matrix_integer_sparse.pyx'],
950
libraries = ['gmp']),
951
952
Extension('sage.matrix.matrix_mod2_dense',
953
sources = ['sage/matrix/matrix_mod2_dense.pyx'],
954
libraries = ['gmp','m4ri', 'gd', 'png12', 'z'],
955
extra_compile_args = ['-std=c99'] + m4ri_extra_compile_args,
956
depends = [SAGE_INC + "png.h", SAGE_INC + "m4ri/m4ri.h"]),
957
958
Extension('sage.matrix.matrix_mod2e_dense',
959
sources = ['sage/matrix/matrix_mod2e_dense.pyx'],
960
libraries = ['m4rie', 'm4ri', 'givaro', 'ntl', 'gmpxx', 'gmp', 'm', 'stdc++'],
961
depends = [SAGE_INC + "m4rie/m4rie.h"],
962
include_dirs = [SAGE_INC + 'm4rie'],
963
extra_compile_args = m4ri_extra_compile_args,
964
language="c++"),
965
966
Extension('sage.matrix.matrix_modn_dense',
967
sources = ['sage/matrix/matrix_modn_dense.pyx'],
968
libraries = ['gmp']),
969
970
Extension('sage.matrix.matrix_modn_dense_float',
971
sources = ['sage/matrix/matrix_modn_dense_float.pyx'],
972
language="c++",
973
libraries = ['gmp', 'linbox', 'givaro', BLAS, BLAS2],
974
extra_compile_args = ['-DDISABLE_COMMENTATOR']),
975
976
Extension('sage.matrix.matrix_modn_dense_double',
977
sources = ['sage/matrix/matrix_modn_dense_double.pyx'],
978
language="c++",
979
libraries = ['gmp', 'linbox', 'givaro', BLAS, BLAS2],
980
extra_compile_args = ['-DDISABLE_COMMENTATOR']),
981
982
Extension('sage.matrix.matrix_modn_sparse',
983
sources = ['sage/matrix/matrix_modn_sparse.pyx'],
984
libraries = ['gmp']),
985
986
Extension('sage.matrix.matrix_mpolynomial_dense',
987
sources = ['sage/matrix/matrix_mpolynomial_dense.pyx'],
988
libraries = singular_libs,
989
language="c++",
990
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
991
depends = singular_depends),
992
993
#Extension('sage.matrix.matrix_pid_dense',
994
# sources = ['sage/matrix/matrix_pid_dense.pyx']),
995
996
#Extension('sage.matrix.matrix_pid_sparse',
997
# sources = ['sage/matrix/matrix_pid_sparse.pyx']),
998
999
Extension('sage.matrix.matrix_rational_dense',
1000
sources = ['sage/matrix/matrix_rational_dense.pyx'],
1001
libraries = ['pari', 'gmp']),
1002
1003
Extension('sage.matrix.matrix_rational_sparse',
1004
sources = ['sage/matrix/matrix_rational_sparse.pyx'],
1005
libraries = ['gmp']),
1006
1007
Extension('sage.matrix.matrix_real_double_dense',
1008
sources = ['sage/matrix/matrix_real_double_dense.pyx'],
1009
libraries=[BLAS, BLAS2],
1010
include_dirs = numpy_include_dirs,
1011
depends = numpy_depends),
1012
1013
Extension('sage.matrix.matrix_sparse',
1014
sources = ['sage/matrix/matrix_sparse.pyx']),
1015
1016
Extension('sage.matrix.matrix_symbolic_dense',
1017
sources = ['sage/matrix/matrix_symbolic_dense.pyx']),
1018
1019
Extension('sage.matrix.matrix_window',
1020
sources = ['sage/matrix/matrix_window.pyx']),
1021
1022
Extension('sage.matrix.matrix_window_modn_dense',
1023
sources = ['sage/matrix/matrix_window_modn_dense.pyx']),
1024
1025
Extension('sage.matrix.misc',
1026
sources = ['sage/matrix/misc.pyx'],
1027
libraries=['mpfr','gmp']),
1028
1029
Extension('sage.matrix.strassen',
1030
sources = ['sage/matrix/strassen.pyx']),
1031
1032
#Extension('sage.matrix.padics.matrix_padic_capped_relative_dense',
1033
# sources = ['sage/matrix/padics/matrix_padic_capped_relative_dense.pyx']),
1034
1035
################################
1036
##
1037
## sage.media
1038
##
1039
################################
1040
1041
Extension('sage.media.channels',
1042
sources = ['sage/media/channels.pyx']),
1043
1044
################################
1045
##
1046
## sage.misc
1047
##
1048
################################
1049
1050
Extension('sage.misc.allocator',
1051
sources = ['sage/misc/allocator.pyx']),
1052
1053
Extension('sage.misc.bitset',
1054
sources = ['sage/misc/bitset.pyx']),
1055
1056
Extension('sage.misc.cachefunc',
1057
sources = ['sage/misc/cachefunc.pyx']),
1058
1059
Extension('sage.misc.citation',
1060
sources = ['sage/misc/citation.pyx']),
1061
1062
Extension('sage.misc.constant_function',
1063
sources = ['sage/misc/constant_function.pyx']),
1064
1065
Extension('sage.misc.cython_c',
1066
sources = ['sage/misc/cython_c.pyx']),
1067
1068
Extension('sage.misc.c3',
1069
sources = ['sage/misc/c3.pyx']),
1070
1071
Extension('sage.misc.derivative',
1072
sources = ['sage/misc/derivative.pyx']),
1073
1074
Extension('sage.misc.fpickle',
1075
sources = ['sage/misc/fpickle.pyx']),
1076
1077
Extension('sage.misc.function_mangling',
1078
sources = ['sage/misc/function_mangling.pyx']),
1079
1080
Extension('sage.misc.lazy_import',
1081
sources = ['sage/misc/lazy_import.pyx']),
1082
1083
Extension('sage.misc.misc_c',
1084
sources = ['sage/misc/misc_c.pyx']),
1085
1086
Extension('sage.misc.nested_class',
1087
sources = ['sage/misc/nested_class.pyx']),
1088
1089
Extension('sage.misc.parser',
1090
sources = ['sage/misc/parser.pyx']),
1091
1092
Extension('sage.misc.pickle_old',
1093
sources = ['sage/misc/pickle_old.pyx']),
1094
1095
Extension('sage.misc.randstate',
1096
sources = ['sage/misc/randstate.pyx'],
1097
libraries = ['gmp']),
1098
1099
Extension('sage.misc.refcount',
1100
sources = ['sage/misc/refcount.pyx']),
1101
1102
Extension('sage.misc.reset',
1103
sources = ['sage/misc/reset.pyx']),
1104
1105
Extension('sage.misc.sage_timeit_class',
1106
sources = ['sage/misc/sage_timeit_class.pyx']),
1107
1108
Extension('sage.misc.classcall_metaclass',
1109
sources = ['sage/misc/classcall_metaclass.pyx']),
1110
1111
Extension('sage.misc.sagex_ds',
1112
sources = ['sage/misc/sagex_ds.pyx']),
1113
1114
Extension('sage.misc.search',
1115
sources = ['sage/misc/search.pyx']),
1116
1117
Extension('sage.misc.session',
1118
sources = ['sage/misc/session.pyx']),
1119
1120
Extension('sage.misc.stopgap',
1121
sources = ['sage/misc/stopgap.pyx']),
1122
1123
################################
1124
##
1125
## sage.modular
1126
##
1127
################################
1128
1129
Extension('sage.modular.arithgroup.congroup_pyx',
1130
sources = ['sage/modular/arithgroup/congroup_pyx.pyx']),
1131
1132
Extension('sage.modular.arithgroup.farey_symbol',
1133
sources = ['sage/modular/arithgroup/farey_symbol.pyx',
1134
'sage/modular/arithgroup/farey.cpp',
1135
'sage/modular/arithgroup/sl2z.cpp'],
1136
libraries = ['gmpxx'],
1137
language = 'c++'),
1138
1139
Extension('sage.modular.modform.eis_series_cython',
1140
sources = ['sage/modular/modform/eis_series_cython.pyx'],
1141
libraries = ["gmp", "flint"],
1142
include_dirs = [SAGE_INC + 'FLINT/'],
1143
extra_compile_args = ['-std=c99'],
1144
depends = flint_depends),
1145
1146
Extension('sage.modular.modsym.apply',
1147
sources = ['sage/modular/modsym/apply.pyx'],
1148
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
1149
include_dirs = [SAGE_INC + 'FLINT/'],
1150
extra_compile_args=["-std=c99", "-D_XPG6"],
1151
depends = flint_depends),
1152
1153
Extension('sage.modular.modsym.relation_matrix_pyx',
1154
sources = ['sage/modular/modsym/relation_matrix_pyx.pyx']),
1155
1156
Extension('sage.modular.modsym.heilbronn',
1157
sources = ['sage/modular/modsym/heilbronn.pyx'],
1158
libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],
1159
include_dirs = [SAGE_INC + 'FLINT/'],
1160
extra_compile_args=["-std=c99", "-D_XPG6"],
1161
depends = flint_depends),
1162
1163
Extension('sage.modular.modsym.p1list',
1164
sources = ['sage/modular/modsym/p1list.pyx'],
1165
libraries = ['gmp']),
1166
1167
################################
1168
##
1169
## sage.modules
1170
##
1171
################################
1172
1173
Extension('sage.modules.free_module_element',
1174
sources = ['sage/modules/free_module_element.pyx'],
1175
depends = numpy_depends),
1176
1177
Extension('sage.modules.module',
1178
sources = ['sage/modules/module.pyx']),
1179
1180
Extension('sage.modules.vector_complex_double_dense',
1181
['sage/modules/vector_complex_double_dense.pyx'],
1182
libraries = [BLAS, BLAS2],
1183
include_dirs = numpy_include_dirs,
1184
depends = numpy_depends),
1185
1186
Extension('sage.modules.vector_double_dense',
1187
['sage/modules/vector_double_dense.pyx'],
1188
libraries = [BLAS, BLAS2],
1189
include_dirs = numpy_include_dirs,
1190
depends = numpy_depends),
1191
1192
Extension('sage.modules.vector_integer_dense',
1193
sources = ['sage/modules/vector_integer_dense.pyx'],
1194
libraries = ['gmp']),
1195
1196
Extension('sage.modules.vector_modn_dense',
1197
extra_compile_args = ['-std=c99'],
1198
sources = ['sage/modules/vector_modn_dense.pyx']),
1199
1200
Extension('sage.modules.vector_mod2_dense',
1201
sources = ['sage/modules/vector_mod2_dense.pyx'],
1202
libraries = ['gmp','m4ri', 'png12', 'gd'],
1203
extra_compile_args = ['-std=c99'] + m4ri_extra_compile_args,
1204
depends = [SAGE_INC + "png.h", SAGE_INC + "m4ri/m4ri.h"]),
1205
1206
Extension('sage.modules.vector_rational_dense',
1207
sources = ['sage/modules/vector_rational_dense.pyx'],
1208
libraries = ['gmp']),
1209
1210
Extension('sage.modules.vector_real_double_dense',
1211
['sage/modules/vector_real_double_dense.pyx'],
1212
libraries = [BLAS, BLAS2],
1213
include_dirs = numpy_include_dirs,
1214
depends = numpy_depends),
1215
1216
# Extension('sage.modules.vector_rational_sparse',
1217
# sources = ['sage/modules/vector_rational_sparse.pyx'],
1218
# libraries = ['gmp']),
1219
1220
################################
1221
##
1222
## sage.numerical
1223
##
1224
################################
1225
1226
1227
Extension("sage.numerical.mip",
1228
["sage/numerical/mip.pyx"],
1229
include_dirs=[SAGE_INC],
1230
libraries=["csage","stdc++"]),
1231
1232
Extension("sage.numerical.backends.generic_backend",
1233
["sage/numerical/backends/generic_backend.pyx"],
1234
include_dirs = [SAGE_INC, "sage/c_lib/include/"],
1235
libraries=["csage", "stdc++"]),
1236
1237
Extension("sage.numerical.backends.glpk_backend",
1238
["sage/numerical/backends/glpk_backend.pyx"],
1239
include_dirs = [SAGE_INC, "sage/c_lib/include/"],
1240
language = 'c++',
1241
libraries=["csage", "stdc++", "glpk", "gmp", "z"]),
1242
1243
################################
1244
##
1245
## sage.plot
1246
##
1247
################################
1248
1249
Extension('sage.plot.complex_plot',
1250
sources = ['sage/plot/complex_plot.pyx'],
1251
include_dirs = numpy_include_dirs,
1252
depends = numpy_depends),
1253
1254
Extension('sage.plot.plot3d.base',
1255
sources = ['sage/plot/plot3d/base.pyx'],
1256
extra_compile_args=["-std=c99"]),
1257
1258
Extension('sage.plot.plot3d.implicit_surface',
1259
sources = ['sage/plot/plot3d/implicit_surface.pyx'],
1260
libraries = ['gsl'],
1261
include_dirs = numpy_include_dirs,
1262
depends = numpy_depends),
1263
1264
Extension('sage.plot.plot3d.index_face_set',
1265
sources = ['sage/plot/plot3d/index_face_set.pyx'],
1266
extra_compile_args=["-std=c99"]),
1267
1268
Extension('sage.plot.plot3d.parametric_surface',
1269
sources = ['sage/plot/plot3d/parametric_surface.pyx']),
1270
1271
Extension('sage.plot.plot3d.shapes',
1272
sources = ['sage/plot/plot3d/shapes.pyx']),
1273
1274
Extension('sage.plot.plot3d.transform',
1275
sources = ['sage/plot/plot3d/transform.pyx']),
1276
1277
################################
1278
##
1279
## sage.quadratic_forms
1280
##
1281
################################
1282
1283
Extension('sage.quadratic_forms.count_local_2',
1284
sources = ['sage/quadratic_forms/count_local_2.pyx'],
1285
libraries = ['gmp']),
1286
1287
Extension('sage.quadratic_forms.quadratic_form__evaluate',
1288
sources = ['sage/quadratic_forms/quadratic_form__evaluate.pyx']),
1289
1290
################################
1291
##
1292
## sage.rings
1293
##
1294
################################
1295
1296
Extension('sage.rings.bernmm',
1297
sources = ['sage/rings/bernmm.pyx',
1298
'sage/rings/bernmm/bern_modp.cpp',
1299
'sage/rings/bernmm/bern_modp_util.cpp',
1300
'sage/rings/bernmm/bern_rat.cpp'],
1301
libraries = ['ntl', 'gmp', 'stdc++', 'pthread'],
1302
depends = ['sage/rings/bernmm/bern_modp.h',
1303
'sage/rings/bernmm/bern_modp_util.h',
1304
'sage/rings/bernmm/bern_rat.h'],
1305
language = 'c++',
1306
define_macros=[('USE_THREADS', '1'),
1307
('THREAD_STACK_SIZE', '4096')]),
1308
1309
Extension('sage.rings.bernoulli_mod_p',
1310
sources = ['sage/rings/bernoulli_mod_p.pyx'],
1311
libraries=['ntl','stdc++'],
1312
language = 'c++',
1313
include_dirs = ['sage/libs/ntl/']),
1314
1315
Extension('sage.rings.complex_double',
1316
sources = ['sage/rings/complex_double.pyx'],
1317
extra_compile_args=["-std=c99", "-D_XPG6"],
1318
libraries = (['gsl', BLAS, BLAS2, 'pari', 'gmp'] +
1319
uname_specific('CYGWIN', ['mc', 'md'], []) +
1320
['m'])),
1321
1322
Extension('sage.rings.complex_interval',
1323
sources = ['sage/rings/complex_interval.pyx'],
1324
libraries = ['mpfi', 'mpfr', 'gmp']),
1325
1326
Extension('sage.rings.complex_number',
1327
sources = ['sage/rings/complex_number.pyx'],
1328
libraries = ['mpfr', 'gmp'],
1329
depends = numpy_depends),
1330
1331
Extension('sage.rings.integer',
1332
sources = ['sage/rings/integer.pyx'],
1333
libraries=['ntl', 'pari', 'flint', 'gmp'],
1334
include_dirs = [SAGE_INC + 'FLINT/'],
1335
depends = numpy_depends + flint_depends),
1336
1337
Extension('sage.rings.integer_ring',
1338
sources = ['sage/rings/integer_ring.pyx'],
1339
libraries=['ntl', 'gmp']),
1340
1341
Extension('sage.rings.factorint',
1342
sources = ['sage/rings/factorint.pyx'],
1343
libraries=['gmp']),
1344
1345
Extension('sage.rings.fast_arith',
1346
sources = ['sage/rings/fast_arith.pyx'],
1347
libraries=['pari','gmp','csage']),
1348
1349
Extension('sage.rings.fraction_field_element',
1350
sources = ['sage/rings/fraction_field_element.pyx']),
1351
1352
Extension('sage.rings.fraction_field_FpT',
1353
sources = ['sage/rings/fraction_field_FpT.pyx'],
1354
libraries = ["csage", "flint", "gmp", "gmpxx", "ntl", "zn_poly"],
1355
extra_compile_args=["-std=c99", "-D_XPG6"],
1356
include_dirs = [SAGE_INC + 'FLINT/'],
1357
depends = flint_depends),
1358
1359
Extension('sage.rings.laurent_series_ring_element',
1360
sources = ['sage/rings/laurent_series_ring_element.pyx']),
1361
1362
Extension('sage.rings.morphism',
1363
sources = ['sage/rings/morphism.pyx']),
1364
1365
Extension('sage.rings.complex_mpc',
1366
sources = ['sage/rings/complex_mpc.pyx'],
1367
libraries = ['mpc', 'mpfr', 'gmp']),
1368
1369
Extension('sage.rings.noncommutative_ideals',
1370
sources = ['sage/rings/noncommutative_ideals.pyx']),
1371
1372
Extension('sage.rings.power_series_mpoly',
1373
sources = ['sage/rings/power_series_mpoly.pyx']),
1374
1375
Extension('sage.rings.power_series_poly',
1376
sources = ['sage/rings/power_series_poly.pyx']),
1377
1378
Extension('sage.rings.power_series_ring_element',
1379
sources = ['sage/rings/power_series_ring_element.pyx']),
1380
1381
Extension('sage.rings.rational',
1382
sources = ['sage/rings/rational.pyx'],
1383
libraries=['ntl', 'gmp'],
1384
depends = numpy_depends),
1385
1386
Extension('sage.rings.real_double',
1387
sources = ['sage/rings/real_double.pyx'],
1388
libraries = ['gsl', 'gmp', BLAS, BLAS2],
1389
depends = numpy_depends,
1390
define_macros=[('GSL_DISABLE_DEPRECATED','1')]),
1391
1392
Extension('sage.rings.real_interval_absolute',
1393
sources = ['sage/rings/real_interval_absolute.pyx'],
1394
libraries = ['gmp']),
1395
1396
Extension('sage.rings.real_lazy',
1397
sources = ['sage/rings/real_lazy.pyx']),
1398
1399
Extension('sage.rings.real_mpfi',
1400
sources = ['sage/rings/real_mpfi.pyx'],
1401
libraries = ['mpfi', 'mpfr', 'gmp']),
1402
1403
Extension('sage.rings.real_mpfr',
1404
sources = ['sage/rings/real_mpfr.pyx'],
1405
libraries = ['mpfr', 'pari', 'gmp'],
1406
depends = numpy_depends),
1407
1408
#Extension('sage.rings.real_rqdf',
1409
# sources = ["sage/rings/real_rqdf.pyx"],
1410
# libraries = ['qd', 'm', 'stdc++','gmp','mpfr' ],
1411
# language='c++'),
1412
1413
Extension('sage.rings.residue_field',
1414
sources = ['sage/rings/residue_field.pyx']),
1415
1416
Extension('sage.rings.ring',
1417
sources = ['sage/rings/ring.pyx']),
1418
1419
################################
1420
##
1421
## sage.rings.finite_rings
1422
##
1423
################################
1424
1425
Extension('sage.rings.finite_rings.finite_field_base',
1426
sources = ['sage/rings/finite_rings/finite_field_base.pyx']),
1427
1428
Extension('sage.rings.finite_rings.element_base',
1429
sources = ['sage/rings/finite_rings/element_base.pyx']),
1430
1431
Extension('sage.rings.finite_rings.integer_mod',
1432
sources = ['sage/rings/finite_rings/integer_mod.pyx'],
1433
libraries = ['gmp']),
1434
1435
Extension('sage.rings.finite_rings.element_givaro',
1436
sources = ["sage/rings/finite_rings/element_givaro.pyx"],
1437
# this order is needed to compile under windows.
1438
libraries = ['givaro', 'ntl', 'gmpxx', 'gmp', 'm', 'stdc++', ],
1439
language='c++'),
1440
1441
Extension('sage.rings.finite_rings.element_ntl_gf2e',
1442
sources = ['sage/rings/finite_rings/element_ntl_gf2e.pyx'],
1443
libraries = ['ntl', 'gmp'],
1444
language = 'c++'),
1445
1446
################################
1447
##
1448
## sage.rings.function_field
1449
##
1450
################################
1451
1452
Extension('sage.rings.function_field.function_field_element',
1453
sources = ['sage/rings/function_field/function_field_element.pyx']),
1454
1455
################################
1456
##
1457
## sage.rings.number_field
1458
##
1459
################################
1460
1461
Extension('sage.rings.number_field.number_field_base',
1462
sources = ['sage/rings/number_field/number_field_base.pyx']),
1463
1464
Extension('sage.rings.number_field.number_field_element',
1465
sources = ['sage/rings/number_field/number_field_element.pyx'],
1466
libraries=['ntl','gmp'],
1467
language = 'c++'),
1468
1469
Extension('sage.rings.number_field.number_field_element_quadratic',
1470
sources = ['sage/rings/number_field/number_field_element_quadratic.pyx'],
1471
libraries=['ntl', 'gmp'],
1472
language = 'c++'),
1473
1474
Extension('sage.rings.number_field.number_field_morphisms',
1475
sources = ['sage/rings/number_field/number_field_morphisms.pyx']),
1476
1477
Extension('sage.rings.number_field.totallyreal',
1478
sources = ['sage/rings/number_field/totallyreal.pyx'],
1479
libraries = ['pari', 'gmp']),
1480
1481
Extension('sage.rings.number_field.totallyreal_data',
1482
sources = ['sage/rings/number_field/totallyreal_data.pyx'],
1483
libraries = ['gmp'],
1484
depends = numpy_depends),
1485
1486
################################
1487
##
1488
## sage.rings.padics
1489
##
1490
################################
1491
1492
Extension('sage.rings.padics.local_generic_element',
1493
sources = ['sage/rings/padics/local_generic_element.pyx']),
1494
1495
Extension('sage.rings.padics.padic_base_coercion',
1496
sources = ['sage/rings/padics/padic_base_coercion.pyx'],
1497
libraries=['gmp']),
1498
1499
Extension('sage.rings.padics.padic_base_generic_element',
1500
sources = ['sage/rings/padics/padic_base_generic_element.pyx'],
1501
libraries=['gmp']),
1502
1503
Extension('sage.rings.padics.padic_capped_absolute_element',
1504
sources = ['sage/rings/padics/padic_capped_absolute_element.pyx'],
1505
libraries=['gmp']),
1506
1507
Extension('sage.rings.padics.padic_capped_relative_element',
1508
sources = ['sage/rings/padics/padic_capped_relative_element.pyx'],
1509
libraries=['gmp', 'csage']),
1510
1511
Extension('sage.rings.padics.padic_ext_element',
1512
sources = ['sage/rings/padics/padic_ext_element.pyx'],
1513
libraries=['ntl', 'gmp', 'csage', 'gmpxx', 'm', 'stdc++'],
1514
language='c++'),
1515
1516
Extension('sage.rings.padics.padic_fixed_mod_element',
1517
sources = ['sage/rings/padics/padic_fixed_mod_element.pyx'],
1518
libraries=['gmp']),
1519
1520
Extension('sage.rings.padics.padic_generic_element',
1521
sources = ['sage/rings/padics/padic_generic_element.pyx'],
1522
libraries=['gmp']),
1523
1524
Extension('sage.rings.padics.padic_printing',
1525
sources = ['sage/rings/padics/padic_printing.pyx'],
1526
libraries=['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++'],
1527
language='c++'),
1528
1529
Extension('sage.rings.padics.padic_ZZ_pX_CA_element',
1530
sources = ['sage/rings/padics/padic_ZZ_pX_CA_element.pyx'],
1531
libraries = ['ntl', 'gmp', 'csage','gmpxx','m','stdc++'],
1532
language='c++'),
1533
1534
Extension('sage.rings.padics.padic_ZZ_pX_CR_element',
1535
sources = ['sage/rings/padics/padic_ZZ_pX_CR_element.pyx'],
1536
libraries=['ntl', 'gmp', 'csage','gmpxx','m','stdc++'],
1537
language='c++'),
1538
1539
Extension('sage.rings.padics.padic_ZZ_pX_element',
1540
sources = ['sage/rings/padics/padic_ZZ_pX_element.pyx'],
1541
libraries=['ntl', 'gmp', 'csage', 'gmpxx', 'm', 'stdc++'],
1542
language='c++'),
1543
1544
Extension('sage.rings.padics.padic_ZZ_pX_FM_element',
1545
sources = ['sage/rings/padics/padic_ZZ_pX_FM_element.pyx'],
1546
libraries=['ntl', 'gmp', 'csage', 'gmpxx', 'm', 'stdc++'],
1547
language='c++'),
1548
1549
Extension('sage.rings.padics.pow_computer',
1550
sources = ['sage/rings/padics/pow_computer.pyx'],
1551
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
1552
language='c++'),
1553
1554
Extension('sage.rings.padics.pow_computer_ext',
1555
sources = ['sage/rings/padics/pow_computer_ext.pyx'],
1556
libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"],
1557
language='c++'),
1558
1559
################################
1560
##
1561
## sage.rings.polynomial
1562
##
1563
################################
1564
1565
Extension('sage.rings.polynomial.cyclotomic',
1566
sources = ['sage/rings/polynomial/cyclotomic.pyx']),
1567
1568
Extension('sage.rings.polynomial.laurent_polynomial',
1569
sources = ['sage/rings/polynomial/laurent_polynomial.pyx']),
1570
1571
Extension('sage.rings.polynomial.multi_polynomial',
1572
sources = ['sage/rings/polynomial/multi_polynomial.pyx']),
1573
1574
Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular',
1575
sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'],
1576
libraries = singular_libs,
1577
language="c++",
1578
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
1579
depends = singular_depends),
1580
1581
Extension('sage.rings.polynomial.plural',
1582
sources = ['sage/rings/polynomial/plural.pyx'],
1583
libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
1584
language="c++",
1585
include_dirs = [SAGE_ROOT +'/local/include/singular'],
1586
depends = [SAGE_ROOT + "/local/include/libsingular.h"]),
1587
1588
Extension('sage.rings.polynomial.multi_polynomial_libsingular',
1589
sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'],
1590
libraries = singular_libs,
1591
language="c++",
1592
include_dirs = [SAGE_INC + 'singular', SAGE_INC + 'factory'],
1593
depends = singular_depends),
1594
1595
Extension('sage.rings.polynomial.multi_polynomial_ring_generic',
1596
sources = ['sage/rings/polynomial/multi_polynomial_ring_generic.pyx']),
1597
1598
Extension('sage.rings.polynomial.polydict',
1599
sources = ['sage/rings/polynomial/polydict.pyx']),
1600
1601
Extension('sage.rings.polynomial.polynomial_compiled',
1602
sources = ['sage/rings/polynomial/polynomial_compiled.pyx']),
1603
1604
Extension('sage.rings.polynomial.polynomial_element',
1605
sources = ['sage/rings/polynomial/polynomial_element.pyx'],
1606
depends = numpy_depends),
1607
1608
Extension('sage.rings.polynomial.polynomial_gf2x',
1609
sources = ['sage/rings/polynomial/polynomial_gf2x.pyx'],
1610
libraries = ['ntl', 'stdc++', 'gmp'],
1611
extra_compile_args = m4ri_extra_compile_args,
1612
language = 'c++',
1613
depends = [SAGE_INC + 'm4ri/m4ri.h'],
1614
include_dirs = ['sage/libs/ntl/']),
1615
1616
Extension('sage.rings.polynomial.polynomial_zz_pex',
1617
sources = ['sage/rings/polynomial/polynomial_zz_pex.pyx'],
1618
libraries = ['ntl', 'stdc++', 'gmp'],
1619
language = 'c++',
1620
include_dirs = ['sage/libs/ntl/']),
1621
1622
Extension('sage.rings.polynomial.polynomial_zmod_flint',
1623
sources = ['sage/rings/polynomial/polynomial_zmod_flint.pyx'],
1624
libraries = ["csage", "flint", "gmp", "gmpxx", "ntl", "zn_poly"],
1625
extra_compile_args=["-std=c99", "-D_XPG6"],
1626
include_dirs = [SAGE_INC + 'FLINT/'],
1627
depends = flint_depends),
1628
1629
Extension('sage.rings.polynomial.polynomial_integer_dense_flint',
1630
sources = ['sage/rings/polynomial/polynomial_integer_dense_flint.pyx'],
1631
language = 'c++',
1632
libraries = ["csage", "flint", "ntl", "gmpxx", "gmp"],
1633
include_dirs = [SAGE_INC + 'FLINT/'],
1634
depends = flint_depends),
1635
1636
Extension('sage.rings.polynomial.polynomial_integer_dense_ntl',
1637
sources = ['sage/rings/polynomial/polynomial_integer_dense_ntl.pyx'],
1638
libraries = ['ntl', 'stdc++', 'gmp'],
1639
language = 'c++',
1640
include_dirs = ['sage/libs/ntl/']),
1641
1642
Extension('sage.rings.polynomial.polynomial_rational_flint',
1643
sources = ['sage/rings/polynomial/polynomial_rational_flint.pyx', 'sage/libs/flint/fmpq_poly.c'],
1644
language = 'c++',
1645
extra_compile_args=["-std=c99"] + uname_specific('SunOS', [], ['-D_XPG6']),
1646
libraries = ["csage", "flint", "ntl", "gmpxx", "gmp"],
1647
include_dirs = [SAGE_INC + 'FLINT/', 'sage/libs/flint/'],
1648
depends = flint_depends),
1649
1650
Extension('sage.rings.polynomial.polynomial_modn_dense_ntl',
1651
sources = ['sage/rings/polynomial/polynomial_modn_dense_ntl.pyx'],
1652
libraries = ['ntl', 'stdc++', 'gmp'],
1653
language = 'c++',
1654
include_dirs = ['sage/libs/ntl/']),
1655
1656
Extension('sage.rings.polynomial.pbori',
1657
sources = ['sage/rings/polynomial/pbori.pyx'],
1658
libraries=['polybori', 'polybori_groebner', 'gd', 'png12', 'm4ri'],
1659
include_dirs = [SAGE_INC, "sage/libs/polybori"],
1660
depends = [SAGE_INC + "polybori/" + hd + ".h" for hd in ["polybori", "config"] ] + \
1661
[SAGE_INC + 'm4ri/m4ri.h'],
1662
extra_compile_args = polybori_extra_compile_args + m4ri_extra_compile_args,
1663
language = 'c++'),
1664
1665
Extension('sage.rings.polynomial.polynomial_real_mpfr_dense',
1666
sources = ['sage/rings/polynomial/polynomial_real_mpfr_dense.pyx'],
1667
libraries = ['mpfr', 'gmp']),
1668
1669
Extension('sage.rings.polynomial.real_roots',
1670
sources = ['sage/rings/polynomial/real_roots.pyx'],
1671
libraries=['mpfr', 'gmp'],
1672
include_dirs = numpy_include_dirs,
1673
depends = numpy_depends),
1674
1675
Extension('sage.rings.polynomial.symmetric_reduction',
1676
sources = ['sage/rings/polynomial/symmetric_reduction.pyx']),
1677
1678
################################
1679
##
1680
## sage.schemes
1681
##
1682
################################
1683
1684
Extension('sage.schemes.elliptic_curves.descent_two_isogeny',
1685
sources = ['sage/schemes/elliptic_curves/descent_two_isogeny.pyx'],
1686
extra_compile_args=["-std=c99"],
1687
depends = [SAGE_INC + 'ratpoints.h',
1688
SAGE_INC + 'gmp.h'] +
1689
flint_depends,
1690
include_dirs = [SAGE_INC + 'FLINT/'],
1691
libraries = ['flint', 'gmp', 'ratpoints']),
1692
1693
Extension('sage.schemes.hyperelliptic_curves.hypellfrob',
1694
sources = ['sage/schemes/hyperelliptic_curves/hypellfrob.pyx',
1695
'sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp',
1696
'sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp',
1697
'sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.cpp'],
1698
libraries = ['ntl', 'stdc++', 'gmp', 'zn_poly'],
1699
depends = ['sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.h',
1700
'sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.h',
1701
'sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.h'],
1702
language = 'c++',
1703
include_dirs = ['sage/libs/ntl/',
1704
'sage/schemes/hyperelliptic_curves/hypellfrob/']),
1705
1706
Extension('sage.schemes.toric.divisor_class',
1707
sources = ['sage/schemes/toric/divisor_class.pyx'],
1708
libraries = ['gmp']),
1709
1710
################################
1711
##
1712
## sage.sets
1713
##
1714
################################
1715
1716
Extension('sage.sets.disjoint_set',
1717
sources = ['sage/sets/disjoint_set.pyx'],
1718
libraries = ['gmp', 'flint'],
1719
include_dirs = [SAGE_INC + 'FLINT/'],
1720
extra_compile_args = ['-std=c99'],
1721
depends = flint_depends),
1722
1723
################################
1724
##
1725
## sage.stats
1726
##
1727
################################
1728
1729
Extension('sage.stats.hmm.util',
1730
sources = ['sage/stats/hmm/util.pyx']),
1731
1732
Extension('sage.stats.hmm.distributions',
1733
sources = ['sage/stats/hmm/distributions.pyx']),
1734
1735
Extension('sage.stats.hmm.hmm',
1736
sources = ['sage/stats/hmm/hmm.pyx']),
1737
1738
Extension('sage.stats.hmm.chmm',
1739
sources = ['sage/stats/hmm/chmm.pyx'],
1740
extra_compile_args=["-std=c99"]),
1741
1742
Extension('sage.stats.intlist',
1743
sources = ['sage/stats/intlist.pyx']),
1744
1745
################################
1746
##
1747
## sage.structure
1748
##
1749
################################
1750
1751
Extension('sage.structure.category_object',
1752
sources = ['sage/structure/category_object.pyx']),
1753
1754
Extension('sage.structure.coerce',
1755
sources = ['sage/structure/coerce.pyx']),
1756
1757
Extension('sage.structure.coerce_actions',
1758
sources = ['sage/structure/coerce_actions.pyx']),
1759
1760
Extension('sage.structure.coerce_dict',
1761
sources = ['sage/structure/coerce_dict.pyx']),
1762
1763
Extension('sage.structure.coerce_maps',
1764
sources = ['sage/structure/coerce_maps.pyx']),
1765
1766
Extension('sage.structure.element',
1767
sources = ['sage/structure/element.pyx']),
1768
1769
Extension('sage.structure.factory',
1770
sources = ['sage/structure/factory.pyx']),
1771
1772
Extension('sage.structure.generators',
1773
sources = ['sage/structure/generators.pyx']),
1774
1775
Extension('sage.structure.mutability',
1776
sources = ['sage/structure/mutability.pyx']),
1777
1778
Extension('sage.structure.parent',
1779
sources = ['sage/structure/parent.pyx']),
1780
1781
Extension('sage.structure.parent_base',
1782
sources = ['sage/structure/parent_base.pyx']),
1783
1784
Extension('sage.structure.parent_gens',
1785
sources = ['sage/structure/parent_gens.pyx']),
1786
1787
Extension('sage.structure.parent_old',
1788
sources = ['sage/structure/parent_old.pyx']),
1789
1790
Extension('sage.structure.sage_object',
1791
sources = ['sage/structure/sage_object.pyx']),
1792
1793
Extension('sage.structure.wrapper_parent',
1794
sources = ['sage/structure/wrapper_parent.pyx']),
1795
1796
################################
1797
##
1798
## sage.symbolic
1799
##
1800
################################
1801
Extension('sage.symbolic.constants_c',
1802
sources = ['sage/symbolic/constants_c.pyx'],
1803
language = 'c++',
1804
depends = ginac_depends,
1805
libraries = ["pynac", "gmp"]),
1806
1807
Extension('sage.symbolic.expression',
1808
sources = ['sage/symbolic/expression.pyx'],
1809
language = 'c++',
1810
depends = ginac_depends,
1811
libraries = ["pynac", "gmp"]),
1812
1813
Extension('sage.symbolic.getitem',
1814
sources = ['sage/symbolic/getitem.pyx'],
1815
language = 'c++',
1816
depends = [SAGE_LOCAL + "/include/pynac/ginac.h"],
1817
libraries = ["pynac", "gmp"]),
1818
1819
Extension('sage.symbolic.function',
1820
sources = ['sage/symbolic/function.pyx'],
1821
language = 'c++',
1822
depends = ginac_depends + numpy_depends,
1823
libraries = ["pynac", "gmp"]),
1824
1825
Extension('sage.symbolic.pynac',
1826
sources = ['sage/symbolic/pynac.pyx'],
1827
language = 'c++',
1828
depends = ginac_depends,
1829
libraries = ["pynac", "gmp", "gsl"]),
1830
1831
Extension('sage.symbolic.ring',
1832
sources = ['sage/symbolic/ring.pyx'],
1833
language = 'c++',
1834
depends = ginac_depends + numpy_depends,
1835
libraries = ["pynac", "gmp"]),
1836
1837
################################
1838
##
1839
## sage.tests
1840
##
1841
################################
1842
Extension('sage.tests.interrupt',
1843
sources = ['sage/tests/interrupt.pyx', 'sage/tests/c_lib.c']),
1844
1845
Extension('sage.tests.stl_vector',
1846
sources = ['sage/tests/stl_vector.pyx'],
1847
language = 'c++'),
1848
1849
Extension('sage.tests.cython',
1850
sources = ['sage/tests/cython.pyx']),
1851
1852
]
1853
1854
# Optional extensions :
1855
# These extensions are to be compiled only if the
1856
# corresponding packages have been installed
1857
1858
from sage.misc.package import is_package_installed
1859
1860
1861
if (os.path.isfile(SAGE_INC + "gurobi_c.h") and
1862
os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")):
1863
ext_modules.append(
1864
Extension("sage.numerical.backends.gurobi_backend",
1865
["sage/numerical/backends/gurobi_backend.pyx"],
1866
include_dirs = [SAGE_INC, "sage/c_lib/include/"],
1867
language = 'c',
1868
libraries = ["csage", "stdc++", "gurobi"])
1869
)
1870
1871
1872
if (os.path.isfile(SAGE_INC + "cplex.h") and
1873
os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")):
1874
ext_modules.append(
1875
Extension("sage.numerical.backends.cplex_backend",
1876
["sage/numerical/backends/cplex_backend.pyx"],
1877
include_dirs = [SAGE_INC, "sage/c_lib/include/"],
1878
language = 'c',
1879
libraries = ["csage", "stdc++", "cplex"])
1880
)
1881
1882
if is_package_installed('cbc'):
1883
ext_modules.append(
1884
Extension("sage.numerical.backends.coin_backend",
1885
["sage/numerical/backends/coin_backend.pyx"],
1886
include_dirs = [SAGE_INC, "sage/c_lib/include/"],
1887
language = 'c++',
1888
libraries = ["csage", "stdc++", "Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils", "OsiCbc", "OsiClp", "Osi"])
1889
)
1890
1891
1892
1893
# Only include darwin_utilities on OS_X >= 10.5
1894
UNAME = os.uname()
1895
if UNAME[0] == "Darwin" and not UNAME[2].startswith('8.'):
1896
ext_modules.append(
1897
Extension('sage.misc.darwin_utilities',
1898
sources = ['sage/misc/darwin_memory_usage.c',
1899
'sage/misc/darwin_utilities.pyx'],
1900
depends = ['sage/misc/darwin_memory_usage.h'])
1901
)
1902
1903
1904
if is_package_installed('lrcalc'):
1905
ext_modules.append(
1906
Extension('sage.libs.lrcalc.lrcalc',
1907
sources = ["sage/libs/lrcalc/lrcalc.pyx"],
1908
include_dirs = [SAGE_LOCAL + '/include/lrcalc/'],
1909
libraries = ["lrcalc"],
1910
depends = [SAGE_LOCAL + "/include/lrcalc/symfcn.h"]), # should include all .h
1911
)
1912
1913
1914