-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (55 loc) · 1.91 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
60
#!/usr/bin/env python
# coding: utf-8
"""
Setup script for package.
"""
from __future__ import unicode_literals, print_function
import os
import sys
import codecs
from email.utils import parseaddr
from setuptools import setup, find_packages
import ezrecords
if sys.argv[-1] == 'publish':
os.system('python setup.py register')
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload --universal')
sys.exit()
def file_get_contents(filename):
"""Reads an entire file into a string."""
assert os.path.exists(filename) and os.path.isfile(filename), 'invalid filename: ' + filename
return codecs.open(filename, 'r', 'utf-8').read()
SETUP_DIR = os.path.abspath(os.path.dirname(__file__))
AUTHOR, AUTHOR_EMAIL = parseaddr(ezrecords.__author__)
LONG_DESCRIPTION = '\n'.join([file_get_contents('README.rst'), file_get_contents('CHANGELOG.md')])
setup(
name='ezrecords',
version=ezrecords.__version__,
description='SQL for the enhanced.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/x-rst',
url='https://github.com/dareenzo/ezrecords',
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license='MIT',
classifiers=(
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Database',
'Topic :: Utilities'
),
keywords=('database', 'db', 'helper', 'utility', 'sql'),
packages=find_packages(exclude=['tests']),
install_requires=['tablib', 'docopt', 'munch', 'psycopg2', 'PyMySQL'],
platforms='any',
entry_points={
'console_scripts': ['ezrecords=ezrecords.cli:cli']
},
include_package_data=True,
zip_safe=False
)