Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 53 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,53 @@
.tox
coverage
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
language: python
python:
- 2.5
- 2.6
- 2.7
- 3.4
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
- pip install . --use-mirrors
# command to run tests, e.g. python setup.py test
script: py.test .

script: python setup.py test
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
VIM Pdb integration
===================

Latest


Use ``pip3 install git+https://github.com/byronyi/vimpdb`` to install the
package.

Use ``python setup.py test`` to test the package if you would like to
participate in the development. (Requires package ``pytest``)

This package is awesome but not active since 2011. Let's port it into py3k!

Remember: put the following config into your ``~/.vimpdbrc``!
::
[vimpdb]
vim_client_script = mvim
vim_server_script = mvim
server_name = VIM
port = 6666

Abstract
========

Expand Down
5 changes: 4 additions & 1 deletion manual_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from __future__ import print_function


def output(arg):
print "MANUAL: arg=", arg
print("MANUAL: arg={}".format(arg))


def main():
Expand Down
34 changes: 32 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
from setuptools import setup, find_packages
import sys
from setuptools.command.test import test as TestCommand


class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['.']

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)


version = '0.4.6dev'

Expand All @@ -25,13 +47,21 @@
author_email='gotcha@bubblenet.be',
url='http://github.com/gotcha/vimpdb',
license='MIT',
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
packages=find_packages(),
zip_safe=False,
install_requires=[
'vim_bridge',
'six'
],
tests_require=[
'mock',
'pytest'
],
package_data = {
'vimpdb': ['vimpdb.vim']
},
cmdclass = {'test': PyTest},
entry_points="""
# -*- Entry points: -*-
""",
Expand Down
1 change: 0 additions & 1 deletion src/vimpdb/tests/scripts/compatiblevim.py

This file was deleted.

1 change: 0 additions & 1 deletion src/vimpdb/tests/scripts/nopython.py

This file was deleted.

1 change: 0 additions & 1 deletion src/vimpdb/tests/scripts/noserver.py

This file was deleted.

1 change: 0 additions & 1 deletion src/vimpdb/tests/scripts/rightserverlist.py

This file was deleted.

1 change: 0 additions & 1 deletion src/vimpdb/tests/scripts/wrongserverlist.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from __future__ import print_function

import optparse
import sys


parser = optparse.OptionParser()
parser.add_option('--servername', dest="server_name")
parser.add_option('--remote-expr', dest="expr")
Expand All @@ -9,6 +13,6 @@
parser.parse_args(sys.argv)

if hasattr(parser.values, 'expr'):
print parser.values.expr, parser.values.server_name
print(parser.values.expr, parser.values.server_name)
if hasattr(parser.values, 'command'):
print parser.values.command, parser.values.server_name
print(parser.values.command, parser.values.server_name)
4 changes: 4 additions & 0 deletions tests/scripts/compatiblevim.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function


print("+clientserver +python")
4 changes: 4 additions & 0 deletions tests/scripts/nopython.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function


print("+clientserver -python")
4 changes: 4 additions & 0 deletions tests/scripts/noserver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function


print("-clientserver +python")
File renamed without changes.
4 changes: 4 additions & 0 deletions tests/scripts/rightserverlist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function


print("VIM")
4 changes: 4 additions & 0 deletions tests/scripts/wrongserverlist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function


print("WRONG")
File renamed without changes.
8 changes: 6 additions & 2 deletions src/vimpdb/tests/test_debugger.py → tests/test_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ def test_hook(mocked_trace_dispatch):
from vimpdb.debugger import hook
from vimpdb.debugger import SwitcherToVimpdb

class Klass:
# A work around for Python bug:
# http://bugs.python.org/issue672115
class Base(object):
pass

class Klass(Base):

def trace_dispatch(self):
pass
Expand All @@ -74,7 +79,6 @@ class Klass:
def do_vim(self):
pass


hook(Klass)

assert not mocked_setupMethod.called
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/vimpdb/bbbconfig.py → vimpdb/bbbconfig.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import os
import ConfigParser
from six.moves import configparser

from vimpdb import errors


def read_from_file_4_0(filename, klass):
parser = ConfigParser.RawConfigParser()
parser = configparser.RawConfigParser()
parser.read(filename)
if not parser.has_section('vimpdb'):
raise errors.BadRCFile('[vimpdb] section is missing in "%s"' %
filename)
filename)
error_msg = ("'%s' option is missing from section [vimpdb] in "
+ "'" + filename + "'.")
+ "'" + filename + "'.")
if parser.has_option('vimpdb', 'script'):
vim_client_script = parser.get('vimpdb', 'script')
else:
Expand Down
Loading