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