1
0
Fork 0

Move pgcli into a directory and make a package.

This commit is contained in:
Amjith Ramanujam 2014-11-26 00:02:34 -08:00
parent 6171a0352f
commit 34bdecea61
7 changed files with 15 additions and 5 deletions

1
pgcli/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__ = '0.2-dev'

View File

@ -26,7 +26,7 @@ from tabulate import tabulate
@click.password_option('-W', '--password', default='',
confirmation_prompt=False)
@click.argument('database', envvar='USER')
def pgcli(database, user, password, host, port):
def cli(database, user, password, host, port):
try:
pgexecute = PGExecute(database, user, password, host, port)
except Exception as e:

View File

@ -1,12 +1,20 @@
from setuptools import setup
import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('pgcli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
setup(
name='pgcli',
author='Amjith Ramanujam',
version='0.1',
version=version,
license='LICENSE.txt',
url='https://github.com/amjith/pgcli',
py_modules=['pgcli'],
packages=find_packages(),
description='CLI for Postgres. With auto-completion and '
'syntax highlighting',
install_requires=[
@ -14,10 +22,11 @@ setup(
'prompt_toolkit',
'psycopg2',
'tabulate',
'sqlparse',
],
entry_points='''
[console_scripts]
pgcli=pgcli:pgcli
pgcli=pgcli.main:cli
''',
classifiers=[
'License :: OSI Approved :: BSD License',