mirror of https://github.com/dbcli/pgcli
Move pgcli into a directory and make a package.
This commit is contained in:
parent
6171a0352f
commit
34bdecea61
|
@ -0,0 +1 @@
|
|||
__version__ = '0.2-dev'
|
|
@ -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:
|
17
setup.py
17
setup.py
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue