Skip to content

Commit 4a3d01b

Browse files
committed
Basic structure for cmd2 as a package
Still have a fair amount of work to do to get this sorted.
1 parent 33f2f03 commit 4a3d01b

8 files changed

Lines changed: 17 additions & 6 deletions

File tree

cmd2/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# -*- coding: utf-8 -*-
3+
#
4+
from .cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes, AddSubmenu
5+
from .cmd2 import can_clip, with_category, categorize
6+
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args
File renamed without changes.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
url='https://github.com/python-cmd2/cmd2',
9696
license='MIT',
9797
platforms=['any'],
98-
py_modules=["cmd2"],
98+
packages=find_packages(),
9999
keywords='command prompt console cmd',
100100
install_requires=INSTALL_REQUIRES,
101101
extras_require=EXTRAS_REQUIRE,

tests/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# -*- coding: utf-8 -*-
3+
#
4+
from .conftest import run_cmd, StdOut, normalize, BASE_HELP, BASE_HELP_VERBOSE, \
5+
HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG

tests/test_argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import cmd2
99
from unittest import mock
1010

11-
from conftest import run_cmd, StdOut
11+
#from conftest import run_cmd, StdOut
1212

1313
# Prefer statically linked gnureadline if available (for macOS compatibility due to issues with libedit)
1414
try:

tests/test_cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
from unittest import mock
2323

2424
import cmd2
25-
from conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \
26-
HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG, StdOut
25+
#from conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \
26+
# HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG, StdOut
2727

2828

2929
def test_ver():

tests/test_submenu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
import cmd2
8-
from conftest import run_cmd, StdOut, normalize
8+
#from conftest import run_cmd, StdOut, normalize
99

1010

1111
class SecondLevelB(cmd2.Cmd):

tests/test_transcript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import cmd2
1818
from cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes
19-
from conftest import run_cmd, StdOut, normalize
19+
#from conftest import run_cmd, StdOut, normalize
2020

2121
class CmdLineApp(Cmd):
2222

0 commit comments

Comments
 (0)