Skip to content

Commit

Permalink
Fix a few runtime errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Nov 14, 2023
1 parent eaa04d4 commit 44d7498
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ curl = declare_dependency(
cc.find_library('curl'),
]
)
# Cannot be found via pkg-config
ec = declare_dependency(
dependencies: [
cc.find_library('ec'),
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ endforeach

install_subdir('hyperbolic_space', install_dir: sage_install_dir / 'geometry')
install_subdir('hyperplane_arrangement', install_dir: sage_install_dir / 'geometry')
install_subdir('polyhedron', install_dir: sage_install_dir / 'geometry')
subdir('polyhedron')
install_subdir('riemannian_manifolds', install_dir: sage_install_dir / 'geometry')
subdir('triangulation')
25 changes: 25 additions & 0 deletions src/sage/geometry/polyhedron/combinatorial_polyhedron/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
py.install_sources(
'all.py',
subdir: 'sage/geometry/polyhedron/combinatorial_polyhedron',
)

extension_data = {
'base': files('base.pyx'),
'combinatorial_face': files('combinatorial_face.pyx'),
'conversions': files('conversions.pyx'),
'face_iterator': files('face_iterator.pyx'),
'face_list_data_structure': files('face_list_data_structure.pyx'),
'list_of_faces': files('list_of_faces.pyx'),
'polyhedron_face_lattice': files('polyhedron_face_lattice.pyx'),
}

foreach name, pyx : extension_data
py.extension_module(name,
sources: pyx,
subdir: 'sage/geometry/polyhedron/combinatorial_polyhedron',
install: true,
include_directories: [inc_cpython, inc_data_structures, inc_rings],
dependencies: [py_dep, cysignals, gmp],
)
endforeach

43 changes: 43 additions & 0 deletions src/sage/geometry/polyhedron/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
py.install_sources(
'all.py',
'backend_cdd.py',
'backend_cdd_rdf.py',
'backend_field.py',
'backend_normaliz.py',
'backend_number_field.py',
'backend_polymake.py',
'backend_ppl.py',
'base.py',
'base0.py',
'base1.py',
'base2.py',
'base3.py',
'base4.py',
'base5.py',
'base6.py',
'base7.py',
'base_QQ.py',
'base_RDF.py',
'base_ZZ.py',
'base_mutable.py',
'base_number_field.py',
'cdd_file_format.py',
'constructor.py',
'double_description.py',
'double_description_inhomogeneous.py',
'face.py',
'generating_function.py',
'lattice_euclidean_group_element.py',
'library.py',
'misc.py',
'palp_database.py',
'parent.py',
'plot.py',
'ppl_lattice_polygon.py',
'ppl_lattice_polytope.py',
'representation.py',
subdir: 'sage/geometry/polyhedron',
)

subdir('combinatorial_polyhedron')
install_subdir('modules', install_dir: sage_install_dir / 'geometry/polyhedron')
29 changes: 16 additions & 13 deletions src/sage/libs/coxeter3/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coxeter3 = cc.find_library('coxeter3', required: false)
py.install_sources(
'__init__.py',
'all__sagemath_coxeter3.py',
Expand All @@ -6,18 +7,20 @@ py.install_sources(
)


extension_data_cpp = {
# 'coxeter': files('coxeter.pyx'), # not yet on conda
}
if coxeter3.found()
extension_data_cpp = {
'coxeter': files('coxeter.pyx'),
}

foreach name, pyx : extension_data_cpp
py.extension_module(name,
sources: pyx,
subdir: 'sage/libs/coxeter3',
install: true,
override_options : ['cython_language=cpp'],
include_directories: [],
dependencies: [py_dep, cysignals, coxeter3],
)
endforeach
foreach name, pyx : extension_data_cpp
py.extension_module(name,
sources: pyx,
subdir: 'sage/libs/coxeter3',
install: true,
override_options : ['cython_language=cpp'],
include_directories: [],
dependencies: [py_dep, cysignals, coxeter3],
)
endforeach
endif

2 changes: 1 addition & 1 deletion src/sage/libs/eclib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ foreach name, pyx : extension_data_cpp
install: true,
override_options : ['cython_language=cpp'],
include_directories: [inc_cpython, inc_ext, inc_flint, inc_ntl, inc_rings],
dependencies: [py_dep, cysignals, flint, gmp],
dependencies: [py_dep, cysignals, flint, gmp, ec],
)
endforeach

2 changes: 1 addition & 1 deletion src/sage/modular/arithgroup/farey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <Python.h>

#include "farey.hpp"
#include "sage/modular/arithgroup/farey_symbol.h"
#include "farey_symbol.h"


using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/arithgroup/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ foreach name, pyx : extension_data
endforeach

extension_data_cpp = {
'farey_symbol': files('farey_symbol.pyx'),
'farey_symbol': files('farey_symbol.pyx', 'sl2z.cpp', 'farey.cpp'),
}

foreach name, pyx : extension_data_cpp
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ foreach name, pyx : extension_data
endforeach

extension_data_cpp = {
'bernmm': files('bernmm.pyx'),
'bernmm': files('bernmm.pyx', 'bernmm/bern_modp.cpp', 'bernmm/bern_modp_util.cpp'),#, 'bernmm/bern_rat.cpp'), - TODO: Compilation error
'bernoulli_mod_p': files('bernoulli_mod_p.pyx'),
'fraction_field_FpT': files('fraction_field_FpT.pyx'),
'rational': files('rational.pyx'),
Expand Down
7 changes: 2 additions & 5 deletions src/sage/rings/polynomial/pbori/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ brial = declare_dependency(
cc.find_library('brial', required: false),
]
)
brial_groebner = declare_dependency(
dependencies: [
cc.find_library('brial-groebner', required: false),
]
)
# Cannot be found via pkg-config
brial_groebner = cc.find_library('brial_groebner')

py.install_sources(
'PyPolyBoRi.py',
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/hyperelliptic_curves/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ py.install_sources(
)

extension_data_cpp = {
'hypellfrob': files('hypellfrob.pyx'),
'hypellfrob': files('hypellfrob.pyx', 'hypellfrob/hypellfrob.cpp', 'hypellfrob/recurrences_ntl.cpp'),
}

foreach name, pyx : extension_data_cpp
Expand Down
2 changes: 1 addition & 1 deletion src/sage/stats/distributions/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ py.install_sources(
)

extension_data = {
'discrete_gaussian_integer': files('discrete_gaussian_integer.pyx'),
'discrete_gaussian_integer': files('discrete_gaussian_integer.pyx', 'dgs_gauss_mp.c', 'dgs_gauss_dp.c', 'dgs_bern.c'),
}

foreach name, pyx : extension_data
Expand Down

0 comments on commit 44d7498

Please sign in to comment.