Skip to content

Commit a1642b1

Browse files
author
Release Manager
committed
gh-36754: Relativize more header imports <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> Follow-up to #36598, relativizing the remaining header imports. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [ ] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36754 Reported by: Tobias Diez Reviewer(s): Matthias Köppe
2 parents 35d8f8c + 233a4ef commit a1642b1

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

src/sage/cpython/debug.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cdef extern from "Python.h":
1818
# Helper to get a pointer to an object's __dict__ slot, if any
1919
PyObject** _PyObject_GetDictPtr(obj)
2020

21-
cdef extern from "sage/cpython/debugimpl.c":
21+
cdef extern from "debugimpl.c":
2222
void _type_debug(PyTypeObject*)
2323

2424
from sage.cpython.getattr cimport AttributeErrorMessage

src/sage/cpython/python_debug.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from cpython.ref cimport PyObject, PyTypeObject
1111

12-
cdef extern from "sage/cpython/python_debug.h":
12+
cdef extern from "python_debug.h":
1313

1414
# This is what is generally meant by "a debug build" of Python.
1515
# Implies Py_REF_DEBUG, Py_TRACE_REFS, and PYMALLOC_DEBUG (if

src/sage/graphs/cliquer.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ from cysignals.memory cimport sig_free
3535
from cysignals.signals cimport sig_on, sig_off
3636

3737

38-
cdef extern from "sage/graphs/cliquer/cl.c":
38+
cdef extern from "cliquer/cl.c":
3939
cdef int sage_clique_max(graph_t *g, int ** list_of_vertices)
4040
cdef int sage_all_clique_max(graph_t *g, int ** list_of_vertices)
4141
cdef int sage_clique_number(graph_t *g)

src/sage/modular/arithgroup/farey.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <Python.h>
3030

3131
#include "farey.hpp"
32-
#include "sage/modular/arithgroup/farey_symbol.h"
32+
#include "farey_symbol.h"
3333

3434

3535
using namespace std;

src/sage/rings/padics/pow_computer_ext.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ from cpython.dict cimport *
5959

6060
from cysignals.signals cimport sig_on, sig_off
6161

62-
include "sage/libs/ntl/decl.pxi"
62+
include "../../libs/ntl/decl.pxi"
6363

6464
from sage.misc.timing import cputime
6565
from sage.libs.gmp.mpz cimport *
@@ -69,7 +69,7 @@ from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
6969
from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX, ntl_ZZ_pX_Modulus
7070
from sage.rings.integer cimport Integer
7171

72-
cdef extern from "sage/ext/ccobject.h":
72+
cdef extern from "../../ext/ccobject.h":
7373
ZZ_c* Allocate_ZZ_array "Allocate_array<ZZ>"(size_t n)
7474
void Delete_ZZ_array "Delete_array<ZZ>"(ZZ_c* v)
7575
ZZ_pX_c* Allocate_ZZ_pX_array "Allocate_array<ZZ_pX>"(size_t n)

src/sage/structure/coerce_dict.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ from cysignals.memory cimport check_calloc, sig_free
7373
cdef extern from "Python.h":
7474
void PyTuple_SET_ITEM(object tuple, Py_ssize_t index, PyObject* item)
7575

76-
cdef extern from "sage/cpython/pyx_visit.h":
76+
cdef extern from "../cpython/pyx_visit.h":
7777
void Py_VISIT3(PyObject*, visitproc, void*)
7878

7979
cdef type KeyedRef, ref

src/sage_setup/autogen/interpreters/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def write_wrapper(self, write):
374374
375375
from sage.ext.fast_callable cimport Wrapper
376376
377-
cdef extern from "sage/ext/interpreters/interp_{{ s.name }}.c":
377+
cdef extern from "interp_{{ s.name }}.c":
378378
{{ myself.func_header(cython=true) -}}
379379
380380
{% if s.err_return != 'NULL' %}

src/sage_setup/autogen/interpreters/specs/cc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def __init__(self):
149149
sage: print(interp.c_header)
150150
<BLANKLINE>
151151
#include <mpc.h>
152-
#include "sage/ext/interpreters/wrapper_cc.h"
152+
#include "wrapper_cc.h"
153153
<BLANKLINE>
154154
155155
So instructions where you need to interact with Python can
@@ -171,7 +171,7 @@ def __init__(self):
171171
self.c_header = ri(0,
172172
'''
173173
#include <mpc.h>
174-
#include "sage/ext/interpreters/wrapper_cc.h"
174+
#include "wrapper_cc.h"
175175
''')
176176

177177
self.pxd_header = ri(0,

src/sage_setup/autogen/interpreters/specs/cdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self):
8585
self.c_header = ri(0,"""
8686
#include <stdlib.h>
8787
#include <complex.h>
88-
#include "sage/ext/interpreters/wrapper_cdf.h"
88+
#include "wrapper_cdf.h"
8989
9090
/* On Solaris, we need to define _Imaginary_I when compiling with GCC,
9191
* otherwise the constant I doesn't work. The definition below is based

src/sage_setup/autogen/interpreters/specs/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(self):
105105
self.chunks = [self.mc_args, self.mc_constants, self.mc_stack,
106106
self.mc_domain_info, self.mc_code]
107107
self.c_header = ri(0, """
108-
#include "sage/ext/interpreters/wrapper_el.h"
108+
#include "wrapper_el.h"
109109
110110
#define CHECK(x) do_check(&(x), domain)
111111

0 commit comments

Comments
 (0)