-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
59 lines (51 loc) · 1.67 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
57
58
59
"""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/sqlint', '__init__.py')) as f:
init_text = f.read()
version = re.search(r'__version__\s*=\s*[\'\"](.+?)[\'\"]', init_text).group(1)
assert version
setup(
name='sqlint',
version=version,
description='Simple Sql Linter',
long_description=long_description,
url='https://github.com/shigeru0215/sqlint',
author='shigeru0215',
author_email='matsuzaki215@gmail.com',
license="MIT",
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Text Processing :: General',
],
packages=find_packages('src', exclude=['tests']),
package_dir={'': 'src'},
package_data={'': ['config/default.ini']},
test_suite='tests',
install_requires=_requirements(),
entry_points={
"console_scripts": [
'sqlint=sqlint.__main__:main',
]
}
)