forked from ulope/pdbtextmatesupport
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
65 lines (53 loc) · 2.7 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import setup, find_packages
setup(name = 'PdbTextMateSupport2',
version = '0.5',
description = 'Display source code in TextMate while debugging with pdb.',
keywords = 'textmate pdb',
author = 'Matthew Schinckel',
author_email = '[email protected]',
url = 'https://github.com/schinckel/pdbtextmatesupport',
download_url = 'http://cheeseshop.python.org/pypi/PdbTextMateSupport2/',
license = 'GPL',
py_modules = ['PdbTextMateSupport'],
scripts = ['pdbtmsupport'],
include_package_data = False,
platforms = 'Mac OS X',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: MacOS X',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python',
'Topic :: Software Development :: Debuggers',
'Topic :: Text Editors',
],
long_description = """\
This module is used to hook up pdb_, the python debugger, with TextMate_, an
advanced text and programming editor for Mac OS, enabling it to display the
debugged source code during a pdb_ session.
.. _pdb: http://docs.python.org/lib/module-pdb.html
.. _TextMate: http://macromates.com/
After downloading and unpacking the package, you should install the helper
module using::
$ python setup.py install
Next you need to hook up pdb_ with this module by add the following to your
``.pdbrc``::
from PdbTextMateSupport import preloop, precmd
pdb.Pdb.preloop = preloop
pdb.Pdb.precmd = precmd
The easiest way to do this is to use the provided script::
$ pdbtmsupport enable
Alternatively you can also do it manually. The ``.pdbrc`` is located in your
home folder and possibly needs to be created first. You may also use the
supplied sample configuration file for pdb_ to enable the hook like::
$ cp pdbrc.sample ~/.pdbrc
Afterwards TextMate_ should get started automatically whenever you enter a
debug session. The current source line will be displayed simultaneously while
stepping through the code. However, having the cursor moved automatically
within that source file is not always very obvious, so you might want to use
the "Highlight current line" feature, which can be enabled in the "General"
tab in TextMate's preferences. """,
)