-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
56 lines (48 loc) · 1.56 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""The setup script."""
import re
import pathlib
from setuptools import setup, find_packages
from os import path
# The directory containing this file
root_dir = pathlib.Path(__file__).parent
def _requirements():
return [name.rstrip() for name in open(path.join(root_dir, 'requirements.txt')).readlines()]
try:
with open(path.join(root_dir, 'README.rst')) as f:
long_description = f.read()
except IOError:
long_description = ''
# read __init__
with open(path.join(root_dir, 'src', '__init__.py')) as f:
init_text = f.read()
version = re.search(r'__version__\s*=\s*[\'\"](.+?)[\'\"]', init_text).group(1)
assert version
setup(
name='src',
version=version,
license="MIT",
author='shigeru0215',
url='https://github.com/shigeru0215/sqlint',
description='Simple Sql Linter',
long_description=long_description,
packages=find_packages(exclude=("tests",)),
test_suite='tests',
install_requires=_requirements(),
classifiers=[
# 'Development Status :: 5 - Production/Stable',
# 'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Database',
'Topic :: Software Development :: Libraries :: Python Modules',
],
entry_points={
"console_scripts": [
'sqlint=src.__main__:main',
]
}
)