forked from aychedee/keteparaha
/
setup.py
67 lines (60 loc) · 1.63 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
from os import path
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
FILTERED_METHODS = [
'addCleanup',
'addTypeEquality',
'addTypeEqualityFunc',
'countTestCases',
'debug',
'defaultTestResult',
'doCleanups',
'id',
'setUp',
'setUpClass',
'tearDownClass',
'skipTest',
'maxDiff',
'longMessage',
'tearDown',
'shortDescription',
]
def doc_filter(doc):
if (
doc.name.startswith('assert') or
doc.name.startswith('fail') or
doc.name in FILTERED_METHODS
):
return False
return True
if sys.argv[1] == 'document':
# Automatically update the documentation
import pdoc
doc_dir = path.abspath(path.join(path.dirname(__file__), 'docs'))
template_dir = path.join(doc_dir, 'templates')
pdoc.tpl_lookup = pdoc.TemplateLookup(directories=[template_dir])
pdoc._template_path = [template_dir]
docs = pdoc.html('keteparaha', docfilter=doc_filter, external_links=True, source=False)
with open(path.join(doc_dir, 'index.html'), 'w') as f:
f.write(docs)
sys.exit(0)
# To update the package on pypi: python setup.py sdist upload
setup(
name='keteparaha',
version='0.0.24',
packages=['keteparaha'],
license='MIT',
author="Hansel Dunlop",
author_email='hansel@interpretthis.org',
url='https://github.com/aychedee/keteparaha/',
description='Keteparaha is a tool for testing modern JS heavy websites',
long_description=open('README.md').read(),
install_requires=[
'imapclient',
'pyvirtualdisplay',
'selenium'
],
)