-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
61 lines (50 loc) · 1.47 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
61
# -*- coding: utf-8 -*-
# ###
# Copyright (c) 2015, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
import os
import re
import sys
from setuptools import setup, find_packages
install_requires = (
'psycopg2>=2.7',
)
tests_require = [
]
if sys.version_info.major < 3:
tests_require.append('mock')
here = os.path.dirname(__file__)
def read(path):
with open(os.path.join(here, path)) as f:
return f.read()
def find_version(path):
m = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
read(path), re.MULTILINE)
if m:
return m.group(1)
raise RuntimeError('Unable to find version string')
LONG_DESC = '\n\n~~~~\n\n'.join([read('README.rst'),
read('CHANGELOG.rst')])
setup(
name='db-migrator',
version=find_version('dbmigrator/__init__.py'),
author='Connexions',
author_email='[email protected]',
url='https://github.com/karenc/db-migrator',
license='AGPL, see also LICENSE.txt',
description='Python package to migrate postgresql database',
long_description=LONG_DESC,
packages=find_packages(),
install_requires=install_requires,
tests_require=tests_require,
test_suite='dbmigrator.tests',
include_package_data=True,
entry_points={
'console_scripts': [
'dbmigrator = dbmigrator.cli:main',
],
},
)