Compile C test sample code with -fPIC
authorMark Florisson <markflorisson88@gmail.com>
Thu, 9 Dec 2010 20:44:16 +0000 (21:44 +0100)
committerMark Florisson <markflorisson88@gmail.com>
Thu, 9 Dec 2010 20:44:16 +0000 (21:44 +0100)
1  2 
Cython/Debugger/Tests/TestLibCython.py
Cython/Debugger/Tests/test_libcython_in_gdb.py
runtests.py
setup.py

index 8afb32797ba92780fba158bdb9c13ed1be6a757c,f02c2e8b11a79f479565d19cccb2e677cdb0318d..69145d52b1d60b467cc0c5c2e260ced5073712b4
@@@ -45,7 -45,7 +45,7 @@@ class DebuggerTestCase(unittest.TestCas
          shutil.copy(cfuncs_file, self.cfuncs_destfile + '.c')
          
          compiler = ccompiler.new_compiler()
--        compiler.compile(['cfuncs.c'], debug=True)
++        compiler.compile(['cfuncs.c'], debug=True, extra_postargs=['-fPIC'])
          
          opts = dict(
              test_directory=self.tempdir,
index 728328a49b6e3c1e71526deda10816ac01dd88f6,f45372e5ed036dbe984f0994e300443752b6a9a1..e8827b66d6e3cfc1b387fb990dd45116da886f34
@@@ -399,6 -382,8 +399,6 @@@ def main(version, trace_code=False)
      if trace_code:
          tracer = trace.Trace(count=False, trace=True, outfile=sys.stderr,
                              ignoredirs=[sys.prefix, sys.exec_prefix])
 -        tracer.runfunc(_main)
 +        tracer.runfunc(runtests)
      else:
-         runtests()
 -        _main()
 -
 -main()
++        runtests()
diff --cc runtests.py
index 1c2ba2d0aa5e25baa233486aafe9baa37efba313,fae603948b89305fa6896fa708c5d997f4713934..25cb8b937a5a9f2ada0f56e2a8245aacbe1a435f
@@@ -643,7 -644,8 +644,8 @@@ class CythonUnitTestCase(CythonCompileT
          except Exception:
              pass
  
 -# TODO: Re-enable once they're more robust.
 -include_debugger = sys.version_info[:2] >= (2, 5) and False
++
 +include_debugger = sys.version_info[:2] > (2, 5)
  
  def collect_unittests(path, module_prefix, suite, selectors):
      def file_matches(filename):
diff --cc setup.py
Simple merge