Ticket #10230: cython_013_cplus.patch

File cython_013_cplus.patch, 1005 bytes (added by malb, 10 years ago)
  • setup.py

    # HG changeset patch
    # User Martin Albrecht <martinralbrecht@googlemail.com>
    # Date 1289070743 0
    # Node ID 221b5bc98a83373499f4240e27ce8cc3ef01f13c
    # Parent  5d0cb16d75b725156f2a9a3cabda74f2554680be
    set --cplus switch for Cython if language='c++'
    
    diff -r 5d0cb16d75b7 -r 221b5bc98a83 setup.py
    a b  
    759759        outfile = f[:-4]
    760760        if m.language == 'c++':
    761761            outfile += ".cpp"
     762            cplus = "--cplus"
    762763        else:
    763764            outfile += ".c"
     765            cplus = ""
    764766
    765767        # call cython, abort if it failed
    766         cmd = "python `which cython` --embed-positions --directive cdivision=True,autotestdict=False -I%s -o %s %s"%(os.getcwd(), outfile, f)
     768        cmd = "python `which cython` --embed-positions --directive cdivision=True,autotestdict=False -I%s %s -o %s %s"%(os.getcwd(), cplus, outfile, f)
    767769        r = run_command(cmd)
    768770        if r:
    769771            return r