Ticket #10094: trac_10094_add_cplus_command_line_option.patch

File trac_10094_add_cplus_command_line_option.patch, 1.0 KB (added by vbraun, 12 years ago)

Initial patch

  • setup.py

    # HG changeset patch
    # User Volker Braun <vbraun@stp.dias.ie>
    # Date 1286454326 -3600
    # Node ID 930bc3ccf0ecd463ca51ef39449c87a8f6c3a8b1
    # Parent  330f63e24306b6afa2e841d215a11c2ad21a7721
    Trac #10094:  cython expects --cplus command line option to enable the new language features.
    
    diff -r 330f63e24306 -r 930bc3ccf0ec setup.py
    a b  
    704704        outfile = f[:-4]
    705705        if m.language == 'c++':
    706706            outfile += ".cpp"
     707            cplus = '--cplus'
    707708        else:
    708709            outfile += ".c"
     710            cplus = ''
    709711
    710712        # call cython, abort if it failed
    711         cmd = "python `which cython` --embed-positions --directive cdivision=True,autotestdict=False -I%s -o %s %s"%(os.getcwd(), outfile, f)
     713        cmd = "python `which cython` %s --embed-positions --directive cdivision=True,autotestdict=False -I%s -o %s %s"%(cplus, os.getcwd(), outfile, f)
    712714        r = run_command(cmd)
    713715        if r:
    714716            return r