Commit c12526e9 authored by Mark Florisson's avatar Mark Florisson

Excluded cygdb from python 2.3 and 2.4 installations and made it 2.5 compatible

Made the distutils extension 2.3 compatible
Renamed the --debug flag to --gdb and --pyrex-debug to --pyrex-gdb
parent fae8606e
...@@ -28,7 +28,7 @@ Options: ...@@ -28,7 +28,7 @@ Options:
Level indicates aggressiveness, default 0 releases nothing. Level indicates aggressiveness, default 0 releases nothing.
-w, --working <directory> Sets the working directory for Cython (the directory modules -w, --working <directory> Sets the working directory for Cython (the directory modules
are searched from) are searched from)
--debug Output debug information for cygdb --gdb Output debug information for cygdb
-D, --no-docstrings Remove docstrings. -D, --no-docstrings Remove docstrings.
-a, --annotate Produce a colorized HTML version of the source. -a, --annotate Produce a colorized HTML version of the source.
...@@ -115,8 +115,8 @@ def parse_command_line(args): ...@@ -115,8 +115,8 @@ def parse_command_line(args):
Options.convert_range = True Options.convert_range = True
elif option == "--line-directives": elif option == "--line-directives":
options.emit_linenums = True options.emit_linenums = True
elif option == "--debug": elif option == "--gdb":
options.debug = True options.gdb_debug = True
options.output_dir = os.curdir options.output_dir = os.curdir
elif option == '-2': elif option == '-2':
options.language_level = 2 options.language_level = 2
......
...@@ -92,7 +92,7 @@ class CompilerCrash(CompileError): ...@@ -92,7 +92,7 @@ class CompilerCrash(CompileError):
CompileError.__init__(self, pos, message) CompileError.__init__(self, pos, message)
class NoElementTreeInstalledException(PyrexError): class NoElementTreeInstalledException(PyrexError):
"""raised when the user enabled options.debug but no ElementTree """raised when the user enabled options.gdb_debug but no ElementTree
implementation was found implementation was found
""" """
......
...@@ -87,7 +87,7 @@ class Context(object): ...@@ -87,7 +87,7 @@ class Context(object):
self.set_language_level(language_level) self.set_language_level(language_level)
self.debug_outputwriter = None self.gdb_debug_outputwriter = None
def set_language_level(self, level): def set_language_level(self, level):
self.language_level = level self.language_level = level
...@@ -182,10 +182,10 @@ class Context(object): ...@@ -182,10 +182,10 @@ class Context(object):
from Cython.TestUtils import TreeAssertVisitor from Cython.TestUtils import TreeAssertVisitor
test_support.append(TreeAssertVisitor()) test_support.append(TreeAssertVisitor())
if options.debug: if options.gdb_debug:
from Cython.Debugger import DebugWriter from Cython.Debugger import DebugWriter
from ParseTreeTransforms import DebugTransform from ParseTreeTransforms import DebugTransform
self.debug_outputwriter = DebugWriter.CythonDebugWriter( self.gdb_debug_outputwriter = DebugWriter.CythonDebugWriter(
options.output_dir) options.output_dir)
debug_transform = [DebugTransform(self, options, result)] debug_transform = [DebugTransform(self, options, result)]
else: else:
...@@ -814,5 +814,5 @@ default_options = dict( ...@@ -814,5 +814,5 @@ default_options = dict(
evaluate_tree_assertions = False, evaluate_tree_assertions = False,
emit_linenums = False, emit_linenums = False,
language_level = 2, language_level = 2,
debug = False, gdb_debug = False,
) )
...@@ -299,7 +299,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -299,7 +299,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
f = open_new_file(result.c_file) f = open_new_file(result.c_file)
rootwriter.copyto(f) rootwriter.copyto(f)
if options.debug: if options.gdb_debug:
self._serialize_lineno_map(env, rootwriter) self._serialize_lineno_map(env, rootwriter)
f.close() f.close()
result.c_file_generated = 1 result.c_file_generated = 1
...@@ -308,7 +308,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -308,7 +308,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
rootwriter.save_annotation(result.main_source_file, result.c_file) rootwriter.save_annotation(result.main_source_file, result.c_file)
def _serialize_lineno_map(self, env, ccodewriter): def _serialize_lineno_map(self, env, ccodewriter):
tb = env.context.debug_outputwriter tb = env.context.gdb_debug_outputwriter
markers = ccodewriter.buffer.allmarkers() markers = ccodewriter.buffer.allmarkers()
d = {} d = {}
......
...@@ -1586,7 +1586,7 @@ class DebugTransform(CythonTransform): ...@@ -1586,7 +1586,7 @@ class DebugTransform(CythonTransform):
self.visited = set() self.visited = set()
# our treebuilder and debug output writer # our treebuilder and debug output writer
# (see Cython.Debugger.debug_output.CythonDebugWriter) # (see Cython.Debugger.debug_output.CythonDebugWriter)
self.tb = self.context.debug_outputwriter self.tb = self.context.gdb_debug_outputwriter
#self.c_output_file = options.output_file #self.c_output_file = options.output_file
self.c_output_file = result.c_file self.c_output_file = result.c_file
...@@ -1626,7 +1626,7 @@ class DebugTransform(CythonTransform): ...@@ -1626,7 +1626,7 @@ class DebugTransform(CythonTransform):
def visit_FuncDefNode(self, node): def visit_FuncDefNode(self, node):
self.visited.add(node.local_scope.qualified_name) self.visited.add(node.local_scope.qualified_name)
node.entry.visibility = 'extern' # node.entry.visibility = 'extern'
if node.py_func is None: if node.py_func is None:
pf_cname = '' pf_cname = ''
else: else:
......
import os import os
from Cython.Debugger import DebugWriter from Cython.Debugger import DebugWriter
from Cython.Compiler import Main
from Cython.Compiler import CmdLine from Cython.Compiler import CmdLine
from Cython.TestUtils import TransformTest from Cython.TestUtils import TransformTest
from Cython.Compiler.ParseTreeTransforms import * from Cython.Compiler.ParseTreeTransforms import *
...@@ -149,7 +148,8 @@ class TestWithTransform(object): # (TransformTest): # Disabled! ...@@ -149,7 +148,8 @@ class TestWithTransform(object): # (TransformTest): # Disabled!
class TestDebugTransform(TestLibCython.DebuggerTestCase): class TestDebugTransform(TestLibCython.DebuggerTestCase):
def elem_hasattrs(self, elem, attrs): def elem_hasattrs(self, elem, attrs):
return all(attr in elem.attrib for attr in attrs) # we shall supporteth python 2.3 !
return all([attr in elem.attrib for attr in attrs])
def test_debug_info(self): def test_debug_info(self):
try: try:
...@@ -161,12 +161,13 @@ class TestDebugTransform(TestLibCython.DebuggerTestCase): ...@@ -161,12 +161,13 @@ class TestDebugTransform(TestLibCython.DebuggerTestCase):
L = list(t.find('/Module/Globals')) L = list(t.find('/Module/Globals'))
# assertTrue is retarded, use the normal assert statement # assertTrue is retarded, use the normal assert statement
assert L assert L
xml_globals = dict((e.attrib['name'], e.attrib['type']) for e in L) xml_globals = dict(
[(e.attrib['name'], e.attrib['type']) for e in L])
self.assertEqual(len(L), len(xml_globals)) self.assertEqual(len(L), len(xml_globals))
L = list(t.find('/Module/Functions')) L = list(t.find('/Module/Functions'))
assert L assert L
xml_funcs = dict((e.attrib['qualified_name'], e) for e in L) xml_funcs = dict([(e.attrib['qualified_name'], e) for e in L])
self.assertEqual(len(L), len(xml_funcs)) self.assertEqual(len(L), len(xml_funcs))
# test globals # test globals
...@@ -176,8 +177,8 @@ class TestDebugTransform(TestLibCython.DebuggerTestCase): ...@@ -176,8 +177,8 @@ class TestDebugTransform(TestLibCython.DebuggerTestCase):
# test functions # test functions
funcnames = 'codefile.spam', 'codefile.ham', 'codefile.eggs' funcnames = 'codefile.spam', 'codefile.ham', 'codefile.eggs'
required_xml_attrs = 'name', 'cname', 'qualified_name' required_xml_attrs = 'name', 'cname', 'qualified_name'
assert all(f in xml_funcs for f in funcnames) assert all([f in xml_funcs for f in funcnames])
spam, ham, eggs = (xml_funcs[funcname] for funcname in funcnames) spam, ham, eggs = [xml_funcs[funcname] for funcname in funcnames]
self.assertEqual(spam.attrib['name'], 'spam') self.assertEqual(spam.attrib['name'], 'spam')
self.assertNotEqual('spam', spam.attrib['cname']) self.assertNotEqual('spam', spam.attrib['cname'])
......
...@@ -17,8 +17,7 @@ import glob ...@@ -17,8 +17,7 @@ import glob
import tempfile import tempfile
import subprocess import subprocess
def usage(): usage = "Usage: cygdb [PATH [GDB_ARGUMENTS]]"
print("Usage: cygdb [PATH GDB_ARGUMENTS]")
def make_command_file(path_to_debug_info, prefix_code='', no_import=False): def make_command_file(path_to_debug_info, prefix_code='', no_import=False):
if not no_import: if not no_import:
...@@ -28,11 +27,8 @@ def make_command_file(path_to_debug_info, prefix_code='', no_import=False): ...@@ -28,11 +27,8 @@ def make_command_file(path_to_debug_info, prefix_code='', no_import=False):
debug_files = glob.glob(pattern) debug_files = glob.glob(pattern)
if not debug_files: if not debug_files:
usage() sys.exit('%s.\nNo debug files were found in %s. Aborting.' % (
sys.exit('No debug files were found in %s. Aborting.' % ( usage, os.path.abspath(path_to_debug_info)))
os.path.abspath(path_to_debug_info)))
fd, tempfilename = tempfile.mkstemp() fd, tempfilename = tempfile.mkstemp()
f = os.fdopen(fd, 'w') f = os.fdopen(fd, 'w')
...@@ -55,14 +51,28 @@ def make_command_file(path_to_debug_info, prefix_code='', no_import=False): ...@@ -55,14 +51,28 @@ def make_command_file(path_to_debug_info, prefix_code='', no_import=False):
return tempfilename return tempfilename
def main(path_to_debug_info=os.curdir, gdb_argv=[], no_import=False): def main(path_to_debug_info=None, gdb_argv=None, no_import=False):
""" """
Start the Cython debugger. This tells gdb to import the Cython and Python Start the Cython debugger. This tells gdb to import the Cython and Python
extensions (libpython.py and libcython.py) and it enables gdb's pending extensions (libcython.py and libpython.py) and it enables gdb's pending
breakpoints breakpoints.
path_to_debug_info is the path to the cython_debug directory path_to_debug_info is the path to the Cython build directory
gdb_argv is the list of options to gdb
no_import tells cygdb whether it should import debug information
""" """
if path_to_debug_info is None:
if len(sys.argv) > 1:
path_to_debug_info = sys.argv[1]
else:
path_to_debug_info = os.curdir
if gdb_argv is None:
gdb_argv = sys.argv[2:]
if path_to_debug_info == '--':
no_import = True
tempfilename = make_command_file(path_to_debug_info, no_import=no_import) tempfilename = make_command_file(path_to_debug_info, no_import=no_import)
p = subprocess.Popen(['gdb', '-command', tempfilename] + gdb_argv) p = subprocess.Popen(['gdb', '-command', tempfilename] + gdb_argv)
while True: while True:
......
from __future__ import with_statement
import os import os
import sys import sys
import errno import errno
......
...@@ -46,7 +46,7 @@ class DebuggerTestCase(unittest.TestCase): ...@@ -46,7 +46,7 @@ class DebuggerTestCase(unittest.TestCase):
ext = Cython.Distutils.extension.Extension( ext = Cython.Distutils.extension.Extension(
'codefile', 'codefile',
['codefile.pyx'], ['codefile.pyx'],
pyrex_debug=True, pyrex_gdb=True,
extra_objects=['cfuncs.o']) extra_objects=['cfuncs.o'])
distutils.core.setup( distutils.core.setup(
......
...@@ -594,8 +594,10 @@ class CyCy(CythonCommand): ...@@ -594,8 +594,10 @@ class CyCy(CythonCommand):
command_class = gdb.COMMAND_NONE command_class = gdb.COMMAND_NONE
completer_class = gdb.COMPLETE_COMMAND completer_class = gdb.COMPLETE_COMMAND
def __init__(self, *args): def __init__(self, name, command_class, completer_class):
super(CythonCommand, self).__init__(*args, prefix=True) # keep the signature 2.5 compatible (i.e. do not use f(*a, k=v)
super(CythonCommand, self).__init__(name, command_class,
completer_class, prefix=True)
commands = dict( commands = dict(
import_ = CyImport.register(), import_ = CyImport.register(),
...@@ -1137,6 +1139,10 @@ class CyGlobals(CyLocals): ...@@ -1137,6 +1139,10 @@ class CyGlobals(CyLocals):
class CyExec(CythonCommand, libpython.PyExec): class CyExec(CythonCommand, libpython.PyExec):
"""
Execute Python code in the nearest Python or Cython frame.
"""
name = '-cy-exec' name = '-cy-exec'
command_class = gdb.COMMAND_STACK command_class = gdb.COMMAND_STACK
completer_class = gdb.COMPLETE_NONE completer_class = gdb.COMPLETE_NONE
...@@ -1206,42 +1212,8 @@ class CyExec(CythonCommand, libpython.PyExec): ...@@ -1206,42 +1212,8 @@ class CyExec(CythonCommand, libpython.PyExec):
self._fill_locals_dict(executor, libpython.pointervalue(local_dict)) self._fill_locals_dict(executor, libpython.pointervalue(local_dict))
executor.evalcode(expr, input_type, global_dict, local_dict) executor.evalcode(expr, input_type, global_dict, local_dict)
finally: finally:
# try:
# tp, val, tb = sys.exc_info()
# sys.exc_clear()
#
# try:
# long(gdb.parse_and_eval("(void *) 0")) == 0
# except RuntimeError:
# # At this point gdb is broken, just exit this shite, it
# # ain't getting better.
#
# # /home/mark/source/code/cython/Cython/Debugger/libcython.py:1206:
# # RuntimeWarning: tp_compare didn't return -1 or -2 for exception
# # long(gdb.parse_and_eval("(void *) 0")) == 0
# # Traceback (most recent call last):
# # File "/home/mark/source/code/cython/Cython/Debugger/libcython.py", line 1206,
# # in invoke
# # long(gdb.parse_and_eval("(void *) 0")) == 0
# # RuntimeError: Cannot convert value to int.
# # Error occurred in Python command: Cannot convert value to int.
# if sys.exc_info()[0] is None and val is not None:
# raise val, tb
#
# for name, value in libpython.PyDictObjectPtr(local_dict).iteritems():
# name = name.proxyval(set())
# cyvar = cython_function.locals.get(name)
# if cyvar is not None and cyvar.type == PythonObject:
# gdb.parse_and_eval('set %s = (PyObject *) %d' % (cyvar.cname,
# pointervalue(value._gdbval)))
# finally:
executor.decref(libpython.pointervalue(local_dict)) executor.decref(libpython.pointervalue(local_dict))
# if sys.exc_info()[0] is None and val is not None:
# raise val, tb
# Functions # Functions
......
#!/usr/bin/python #!/usr/bin/python
# NOTE: this file is taken from the Python source distribution # NOTE: this file is taken from the Python source distribution
# It can be found under Tools/gdb/libpython.py # It can be found under Tools/gdb/libpython.py. It is shipped with Cython
# because it's not installed as a python module, and because changes are only
# merged into new python versions (v3.2+).
''' '''
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb
......
...@@ -43,8 +43,8 @@ class Optimization(object): ...@@ -43,8 +43,8 @@ class Optimization(object):
for flag, option in zip(self.flags, self.state): for flag, option in zip(self.flags, self.state):
if option is not None: if option is not None:
g = (opt for opt in option.split() if opt not in badoptions) L = [opt for opt in option.split() if opt not in badoptions]
self.config_vars[flag] = ' '.join(g) self.config_vars[flag] = ' '.join(L)
def restore_state(self): def restore_state(self):
"restore the original state" "restore the original state"
...@@ -55,6 +55,16 @@ class Optimization(object): ...@@ -55,6 +55,16 @@ class Optimization(object):
optimization = Optimization() optimization = Optimization()
try:
any
except NameError:
def any(it):
for x in it:
if x:
return True
return False
class build_ext(_build_ext.build_ext): class build_ext(_build_ext.build_ext):
...@@ -81,13 +91,13 @@ class build_ext(_build_ext.build_ext): ...@@ -81,13 +91,13 @@ class build_ext(_build_ext.build_ext):
"generate .pxi file for public declarations"), "generate .pxi file for public declarations"),
('pyrex-directives=', None, ('pyrex-directives=', None,
"compiler directive overrides"), "compiler directive overrides"),
('pyrex-debug', None, ('pyrex-gdb', None,
"generate debug information for cygdb"), "generate debug information for cygdb"),
]) ])
boolean_options.extend([ boolean_options.extend([
'pyrex-cplus', 'pyrex-create-listing', 'pyrex-line-directives', 'pyrex-cplus', 'pyrex-create-listing', 'pyrex-line-directives',
'pyrex-c-in-temp', 'pyrex-debug', 'pyrex-c-in-temp', 'pyrex-gdb',
]) ])
def initialize_options(self): def initialize_options(self):
...@@ -99,7 +109,7 @@ class build_ext(_build_ext.build_ext): ...@@ -99,7 +109,7 @@ class build_ext(_build_ext.build_ext):
self.pyrex_directives = None self.pyrex_directives = None
self.pyrex_c_in_temp = 0 self.pyrex_c_in_temp = 0
self.pyrex_gen_pxi = 0 self.pyrex_gen_pxi = 0
self.pyrex_debug = False self.pyrex_gdb = False
def finalize_options (self): def finalize_options (self):
_build_ext.build_ext.finalize_options(self) _build_ext.build_ext.finalize_options(self)
...@@ -114,11 +124,11 @@ class build_ext(_build_ext.build_ext): ...@@ -114,11 +124,11 @@ class build_ext(_build_ext.build_ext):
def run(self): def run(self):
# We have one shot at this before build_ext initializes the compiler. # We have one shot at this before build_ext initializes the compiler.
# If --pyrex-debug is in effect as a command line option or as option # If --pyrex-gdb is in effect as a command line option or as option
# of any Extension module, disable optimization for the C or C++ # of any Extension module, disable optimization for the C or C++
# compiler. # compiler.
if (self.pyrex_debug or any(getattr(ext, 'pyrex_debug', False) if (self.pyrex_gdb or any([getattr(ext, 'pyrex_gdb', False)
for ext in self.extensions)): for ext in self.extensions])):
optimization.disable_optimization() optimization.disable_optimization()
_build_ext.build_ext.run(self) _build_ext.build_ext.run(self)
...@@ -178,7 +188,7 @@ class build_ext(_build_ext.build_ext): ...@@ -178,7 +188,7 @@ class build_ext(_build_ext.build_ext):
cplus = self.pyrex_cplus or getattr(extension, 'pyrex_cplus', 0) or \ cplus = self.pyrex_cplus or getattr(extension, 'pyrex_cplus', 0) or \
(extension.language and extension.language.lower() == 'c++') (extension.language and extension.language.lower() == 'c++')
pyrex_gen_pxi = self.pyrex_gen_pxi or getattr(extension, 'pyrex_gen_pxi', 0) pyrex_gen_pxi = self.pyrex_gen_pxi or getattr(extension, 'pyrex_gen_pxi', 0)
pyrex_debug = self.pyrex_debug or getattr(extension, 'pyrex_debug', False) pyrex_gdb = self.pyrex_gdb or getattr(extension, 'pyrex_gdb', False)
# Set up the include_path for the Cython compiler: # Set up the include_path for the Cython compiler:
# 1. Start with the command line option. # 1. Start with the command line option.
# 2. Add in any (unique) paths from the extension # 2. Add in any (unique) paths from the extension
...@@ -264,7 +274,7 @@ class build_ext(_build_ext.build_ext): ...@@ -264,7 +274,7 @@ class build_ext(_build_ext.build_ext):
emit_linenums = line_directives, emit_linenums = line_directives,
generate_pxi = pyrex_gen_pxi, generate_pxi = pyrex_gen_pxi,
output_dir = output_dir, output_dir = output_dir,
debug = pyrex_debug) gdb_debug = pyrex_gdb)
result = cython_compile(source, options=options, result = cython_compile(source, options=options,
full_module_name=module_name) full_module_name=module_name)
else: else:
......
...@@ -31,7 +31,7 @@ class Extension(_Extension.Extension): ...@@ -31,7 +31,7 @@ class Extension(_Extension.Extension):
put generated C files in temp directory. put generated C files in temp directory.
pyrex_gen_pxi : boolean pyrex_gen_pxi : boolean
generate .pxi file for public declarations generate .pxi file for public declarations
pyrex_debug : boolean pyrex_gdb : boolean
generate Cython debug information for this extension for cygdb generate Cython debug information for this extension for cygdb
""" """
...@@ -58,7 +58,7 @@ class Extension(_Extension.Extension): ...@@ -58,7 +58,7 @@ class Extension(_Extension.Extension):
pyrex_cplus = 0, pyrex_cplus = 0,
pyrex_c_in_temp = 0, pyrex_c_in_temp = 0,
pyrex_gen_pxi = 0, pyrex_gen_pxi = 0,
pyrex_debug = False, pyrex_gdb = False,
**kw): **kw):
_Extension.Extension.__init__(self, name, sources, _Extension.Extension.__init__(self, name, sources,
...@@ -84,7 +84,7 @@ class Extension(_Extension.Extension): ...@@ -84,7 +84,7 @@ class Extension(_Extension.Extension):
self.pyrex_cplus = pyrex_cplus self.pyrex_cplus = pyrex_cplus
self.pyrex_c_in_temp = pyrex_c_in_temp self.pyrex_c_in_temp = pyrex_c_in_temp
self.pyrex_gen_pxi = pyrex_gen_pxi self.pyrex_gen_pxi = pyrex_gen_pxi
self.pyrex_debug = pyrex_debug self.pyrex_gdb = pyrex_gdb
# class Extension # class Extension
......
...@@ -5,15 +5,4 @@ import sys ...@@ -5,15 +5,4 @@ import sys
from Cython.Debugger import Cygdb as cygdb from Cython.Debugger import Cygdb as cygdb
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) > 1:
path_to_debug_info = sys.argv[1]
no_import = False
if path_to_debug_info == '--':
no_import = True
cygdb.main(path_to_debug_info,
gdb_argv=sys.argv[2:],
no_import=no_import)
else:
cygdb.main() cygdb.main()
...@@ -5,15 +5,4 @@ import sys ...@@ -5,15 +5,4 @@ import sys
from Cython.Debugger import Cygdb as cygdb from Cython.Debugger import Cygdb as cygdb
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) > 1:
path_to_debug_info = sys.argv[1]
no_import = False
if path_to_debug_info == '--':
no_import = True
cygdb.main(path_to_debug_info,
gdb_argv=sys.argv[2:],
no_import=no_import)
else:
cygdb.main() cygdb.main()
...@@ -70,6 +70,9 @@ else: ...@@ -70,6 +70,9 @@ else:
# specific to setup # specific to setup
setuptools_extra_args = {} setuptools_extra_args = {}
# tells whether to include cygdb (the script and the Cython.Debugger package
include_debugger = sys.version_info[:2] > (2, 4)
if 'setuptools' in sys.modules: if 'setuptools' in sys.modules:
setuptools_extra_args['zip_safe'] = False setuptools_extra_args['zip_safe'] = False
setuptools_extra_args['entry_points'] = { setuptools_extra_args['entry_points'] = {
...@@ -80,9 +83,13 @@ if 'setuptools' in sys.modules: ...@@ -80,9 +83,13 @@ if 'setuptools' in sys.modules:
scripts = [] scripts = []
else: else:
if os.name == "posix": if os.name == "posix":
scripts = ["bin/cython", "bin/cygdb"] scripts = ["bin/cython"]
if include_debugger:
scripts.append('bin/cygdb')
else: else:
scripts = ["cython.py", "cygdb.py"] scripts = ["cython.py"]
if include_debugger:
scripts.append('cygdb.py')
def compile_cython_modules(profile=False, compile_more=False, cython_with_refnanny=False): def compile_cython_modules(profile=False, compile_more=False, cython_with_refnanny=False):
source_root = os.path.abspath(os.path.dirname(__file__)) source_root = os.path.abspath(os.path.dirname(__file__))
...@@ -247,6 +254,20 @@ setup_args.update(setuptools_extra_args) ...@@ -247,6 +254,20 @@ setup_args.update(setuptools_extra_args)
from Cython import __version__ as version from Cython import __version__ as version
packages = [
'Cython',
'Cython.Build',
'Cython.Compiler',
'Cython.Runtime',
'Cython.Distutils',
'Cython.Plex',
'Cython.Tests',
'Cython.Compiler.Tests',
]
if include_debugger:
packages.append('Cython.Debugger')
setup( setup(
name = 'Cython', name = 'Cython',
version = version, version = version,
...@@ -287,17 +308,7 @@ setup( ...@@ -287,17 +308,7 @@ setup(
], ],
scripts = scripts, scripts = scripts,
packages=[ packages=packages,
'Cython',
'Cython.Build',
'Cython.Compiler',
'Cython.Runtime',
'Cython.Distutils',
'Cython.Plex',
'Cython.Debugger',
'Cython.Tests',
'Cython.Compiler.Tests',
],
# pyximport # pyximport
py_modules = ["pyximport/__init__", py_modules = ["pyximport/__init__",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment