Ticket #20365: 0001-monkeypatch-cython-instead-of-requiring-a-patched-ve.patch

File 0001-monkeypatch-cython-instead-of-requiring-a-patched-ve.patch, 1.1 KB (added by jcristau, 6 years ago)

monkeypatch Cython.Compiler.Main.Context.find_include_file

  • src/setup.py

    From 86db53a0b06501ee5f9ad39165e09b4639aef820 Mon Sep 17 00:00:00 2001
    From: Julien Cristau <jcristau@debian.org>
    Date: Mon, 4 Apr 2016 12:51:16 +0200
    Subject: [PATCH] monkeypatch cython instead of requiring a patched version
    
    ---
     src/setup.py | 9 +++++++++
     1 file changed, 9 insertions(+)
    
    diff --git a/src/setup.py b/src/setup.py
    index cf00136..cc72250 100755
    a b def run_cythonize(): 
    556556    # enclosing Python scope (e.g. to perform variable injection).
    557557    Cython.Compiler.Options.old_style_globals = True
    558558
     559    # let cython find cysignals/signals.pxi by adding sys_path=True
     560    def find_include_file(self, filename, pos):
     561        path = self.search_include_directories(filename, "", pos,
     562                                               include=True, sys_path=True)
     563        if not path:
     564            Cython.Compiler.Main.error(pos, "'%s' not found" % filename)
     565        return path
     566    Cython.Compiler.Main.Context.find_include_file = find_include_file
     567
    559568    debug = False
    560569    if os.environ.get('SAGE_DEBUG', None) != 'no':
    561570        print('Enabling Cython debugging support')