Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relativize more header imports #36754

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/cpython/debug.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cdef extern from "Python.h":
# Helper to get a pointer to an object's __dict__ slot, if any
PyObject** _PyObject_GetDictPtr(obj)

cdef extern from "sage/cpython/debugimpl.c":
cdef extern from "debugimpl.c":
void _type_debug(PyTypeObject*)

from sage.cpython.getattr cimport AttributeErrorMessage
Expand Down
2 changes: 1 addition & 1 deletion src/sage/cpython/python_debug.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from cpython.ref cimport PyObject, PyTypeObject

cdef extern from "sage/cpython/python_debug.h":
cdef extern from "python_debug.h":

# This is what is generally meant by "a debug build" of Python.
# Implies Py_REF_DEBUG, Py_TRACE_REFS, and PYMALLOC_DEBUG (if
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/cliquer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ from cysignals.memory cimport sig_free
from cysignals.signals cimport sig_on, sig_off


cdef extern from "sage/graphs/cliquer/cl.c":
cdef extern from "cliquer/cl.c":
cdef int sage_clique_max(graph_t *g, int ** list_of_vertices)
cdef int sage_all_clique_max(graph_t *g, int ** list_of_vertices)
cdef int sage_clique_number(graph_t *g)
Expand Down
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
4 changes: 2 additions & 2 deletions src/sage/rings/padics/pow_computer_ext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ from cpython.dict cimport *

from cysignals.signals cimport sig_on, sig_off

include "sage/libs/ntl/decl.pxi"
include "../../libs/ntl/decl.pxi"

from sage.misc.timing import cputime
from sage.libs.gmp.mpz cimport *
Expand All @@ -69,7 +69,7 @@ from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX, ntl_ZZ_pX_Modulus
from sage.rings.integer cimport Integer

cdef extern from "sage/ext/ccobject.h":
cdef extern from "../../ext/ccobject.h":
ZZ_c* Allocate_ZZ_array "Allocate_array<ZZ>"(size_t n)
void Delete_ZZ_array "Delete_array<ZZ>"(ZZ_c* v)
ZZ_pX_c* Allocate_ZZ_pX_array "Allocate_array<ZZ_pX>"(size_t n)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/structure/coerce_dict.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ from cysignals.memory cimport check_calloc, sig_free
cdef extern from "Python.h":
void PyTuple_SET_ITEM(object tuple, Py_ssize_t index, PyObject* item)

cdef extern from "sage/cpython/pyx_visit.h":
cdef extern from "../cpython/pyx_visit.h":
void Py_VISIT3(PyObject*, visitproc, void*)

cdef type KeyedRef, ref
Expand Down
2 changes: 1 addition & 1 deletion src/sage_setup/autogen/interpreters/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def write_wrapper(self, write):

from sage.ext.fast_callable cimport Wrapper

cdef extern from "sage/ext/interpreters/interp_{{ s.name }}.c":
cdef extern from "interp_{{ s.name }}.c":
{{ myself.func_header(cython=true) -}}

{% if s.err_return != 'NULL' %}
Expand Down
4 changes: 2 additions & 2 deletions src/sage_setup/autogen/interpreters/specs/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __init__(self):
sage: print(interp.c_header)
<BLANKLINE>
#include <mpc.h>
#include "sage/ext/interpreters/wrapper_cc.h"
#include "wrapper_cc.h"
<BLANKLINE>

So instructions where you need to interact with Python can
Expand All @@ -171,7 +171,7 @@ def __init__(self):
self.c_header = ri(0,
'''
#include <mpc.h>
#include "sage/ext/interpreters/wrapper_cc.h"
#include "wrapper_cc.h"
''')

self.pxd_header = ri(0,
Expand Down
2 changes: 1 addition & 1 deletion src/sage_setup/autogen/interpreters/specs/cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self):
self.c_header = ri(0,"""
#include <stdlib.h>
#include <complex.h>
#include "sage/ext/interpreters/wrapper_cdf.h"
#include "wrapper_cdf.h"

/* On Solaris, we need to define _Imaginary_I when compiling with GCC,
* otherwise the constant I doesn't work. The definition below is based
Expand Down
2 changes: 1 addition & 1 deletion src/sage_setup/autogen/interpreters/specs/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self):
self.chunks = [self.mc_args, self.mc_constants, self.mc_stack,
self.mc_domain_info, self.mc_code]
self.c_header = ri(0, """
#include "sage/ext/interpreters/wrapper_el.h"
#include "wrapper_el.h"

#define CHECK(x) do_check(&(x), domain)

Expand Down
4 changes: 2 additions & 2 deletions src/sage_setup/autogen/interpreters/specs/rr.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __init__(self):
sage: print(interp.c_header)
<BLANKLINE>
#include <mpfr.h>
#include "sage/ext/interpreters/wrapper_rr.h"
#include "wrapper_rr.h"
<BLANKLINE>

The function ``rr_py_call_helper`` is implemented in Cython::
Expand Down Expand Up @@ -188,7 +188,7 @@ def __init__(self):
self.c_header = ri(0,
'''
#include <mpfr.h>
#include "sage/ext/interpreters/wrapper_rr.h"
#include "wrapper_rr.h"
''')

self.pxd_header = ri(0,
Expand Down
Loading