mirror of https://github.com/dbcli/pgcli
Rename scripts and add setup.
This commit is contained in:
parent
e48e0654e1
commit
18f489879e
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import unicode_literals
|
||||
import sys
|
||||
|
||||
import click
|
||||
import psycopg2
|
||||
|
||||
from prompt_toolkit import CommandLineInterface, AbortAction, Exit
|
||||
from prompt_toolkit.completion import Completer, Completion
|
||||
|
@ -47,7 +51,8 @@ class DocumentStyle(Style):
|
|||
styles.update(DefaultStyle.styles)
|
||||
|
||||
|
||||
def main():
|
||||
@click.command()
|
||||
def pgcli():
|
||||
layout = Layout(before_input=DefaultPrompt('> '),
|
||||
menus=[CompletionMenu()],
|
||||
lexer=SqlLexer)
|
||||
|
@ -62,5 +67,3 @@ def main():
|
|||
print 'GoodBye!'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -0,0 +1,26 @@
|
|||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name='pgcli',
|
||||
author='Amjith Ramanujam',
|
||||
version='0.1',
|
||||
license='LICENSE.txt',
|
||||
url='https://github.com/amjith/pgcli',
|
||||
py_modules=['pgcli'],
|
||||
description='CLI for Postgres. With auto-completion and '
|
||||
'syntax highlighting',
|
||||
install_requires=[
|
||||
'Click',
|
||||
'prompt_toolkit',
|
||||
'psycopg2',
|
||||
],
|
||||
entry_points='''
|
||||
[console_scripts]
|
||||
pgcli=pgcli:pgcli
|
||||
''',
|
||||
classifiers=[
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3'
|
||||
],
|
||||
)
|
Loading…
Reference in New Issue