summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-06-05 14:55:09 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-12 12:44:02 -0700
commitdb0f9247b30a905778288f4343888b0510cee093 (patch)
treeb819c2ff5e65733223b00d47f140a3c931854e80
parentb04b5d326175da6267817faca6239bf02a6e5931 (diff)
downloadsqlparse-db0f9247b30a905778288f4343888b0510cee093.tar.gz
Update setup.py
switch scripts to console-script
-rw-r--r--setup.py30
-rw-r--r--[-rwxr-xr-x]sqlparse/__main__.py (renamed from bin/sqlformat)0
-rw-r--r--tox.ini2
3 files changed, 12 insertions, 20 deletions
diff --git a/setup.py b/setup.py
index 45d560f..9fc1c80 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com
@@ -6,16 +7,8 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import re
-import sys
-try:
- from setuptools import setup, find_packages
- packages = find_packages(exclude=('tests',))
-except ImportError:
- if sys.version_info[0] == 3:
- raise RuntimeError('distribute is required to install this package.')
- from distutils.core import setup
- packages = ['sqlparse', 'sqlparse.engine']
+from setuptools import setup, find_packages
def get_version():
@@ -81,19 +74,15 @@ Parsing::
"""
-VERSION = get_version()
-
-
setup(
name='sqlparse',
- version=VERSION,
- packages=packages,
- description='Non-validating SQL parser',
+ version=get_version(),
author='Andi Albrecht',
author_email='albrecht.andi@gmail.com',
+ url='https://github.com/andialbrecht/sqlparse',
+ description='Non-validating SQL parser',
long_description=LONG_DESCRIPTION,
license='BSD',
- url='https://github.com/andialbrecht/sqlparse',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
@@ -107,7 +96,12 @@ setup(
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Database',
- 'Topic :: Software Development'
+ 'Topic :: Software Development',
],
- scripts=['bin/sqlformat'],
+ packages=find_packages(exclude=('tests',)),
+ entry_points={
+ 'console_scripts': [
+ 'sqlparse = sqlparse.__main__:main',
+ ]
+ },
)
diff --git a/bin/sqlformat b/sqlparse/__main__.py
index 3f61064..3f61064 100755..100644
--- a/bin/sqlformat
+++ b/sqlparse/__main__.py
diff --git a/tox.ini b/tox.ini
index 6c27e70..87795ab 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,8 +17,6 @@ deps =
passenv =
TRAVIS
commands =
- python --version
- sqlformat --version
py.test --cov=sqlparse
[testenv:flake8]