Skip to content

Commit

Permalink
Fix farey compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Nov 14, 2023
1 parent 8a6d93b commit d700f64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
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
16 changes: 14 additions & 2 deletions src/sage/modular/arithgroup/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
inc_farey = meson.current_build_dir()
py.install_sources(
'all.py',
'arithgroup_generic.py',
Expand All @@ -22,11 +23,21 @@ foreach name, pyx : extension_data
sources: pyx,
subdir: 'sage/modular/arithgroup',
install: true,
include_directories: [inc_cpython, inc_ext, inc_src, inc_flint, inc_rings],
include_directories: [inc_cpython, inc_ext, inc_flint, inc_rings],
dependencies: [py_dep, cysignals, flint, gmp],
)
endforeach

# Manually create header file, which otherwise is not found
farey_symbol_header = custom_target(
'farey_symbol.h',
output : 'farey_symbol.h',
input : 'farey_symbol.pyx',
install: true,
install_dir: '.',
command : ['cython', '--cplus', '@INPUT@', '-o', '@OUTPUT@'],
)

extension_data_cpp = {
'farey_symbol': files('farey_symbol.pyx', 'sl2z.cpp', 'farey.cpp'),
}
Expand All @@ -37,7 +48,8 @@ foreach name, pyx : extension_data_cpp
subdir: 'sage/modular/arithgroup',
install: true,
override_options : ['cython_language=cpp'],
include_directories: [inc_cpython, inc_ext, inc_src, inc_flint, inc_rings],
cpp_args: ['-I', inc_farey],
include_directories: [inc_cpython, inc_ext, inc_flint, inc_rings],
dependencies: [py_dep, cysignals, flint, gmp],
)
endforeach
Expand Down

0 comments on commit d700f64

Please sign in to comment.