forked from drkjam/pydba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
90 lines (79 loc) · 2.98 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import re
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
def _covert_markdown_badge(x, re_match_markdown=re.compile(r'^\[!\[[^]]+\]\(([^)]+)\)\]\((.+)\)$')):
return re_match_markdown.sub(r'.. image:: \1\n :target: \2', x)
# Load external metadata.
with open('requirements.txt') as fp:
install_requires = map(lambda x: x.strip(), fp.readlines())
with open('docs/source/intro.md') as fp:
long_description = ''.join(map(_covert_markdown_badge, fp))
setup(
name="pydba",
version='1.2.1',
author='David P. D. Moss',
author_email='[email protected]',
url='https://github.com/drkjam/pydba/',
download_url='https://pypi.python.org/pypi/pydba/',
license='MIT License',
platforms='POSIX',
packages=find_packages(),
cmdclass={'test': PyTest},
tests_require=['pytest>=2.8'],
install_requires=install_requires,
description='Python tools for DBAs with deadlines!',
long_description=long_description,
keywords=[
'Software Development',
'Database Administration',
'Systems Administration',
'DBA',
'PostgreSQL',
'SQL',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: SQL',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
'Topic :: System',
'Topic :: System :: Archiving',
'Topic :: System :: Archiving :: Backup',
'Topic :: System :: Distributed Computing',
'Topic :: System :: Installation/Setup',
'Topic :: System :: Recovery Tools',
'Topic :: System :: Shells',
'Topic :: System :: Systems Administration',
'Topic :: System :: System Shells',
'Topic :: Utilities',
],
)