forked from cyraxjoe/nose-html-output
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
57 lines (52 loc) · 1.75 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
import os
import setuptools
REPODIR = os.path.dirname(os.path.realpath(__file__))
def _get_version(repodir):
version = 'UNKNOWN'
init = open(os.path.join(repodir, 'htmloutput', 'htmloutput.py'))
for line in init.readlines():
if '__version__' in line and '=' in line:
version = line.split('=')[-1].strip()
version = version.replace('"', '').replace("'", '')
break
init.close()
return version
def _get_longdesc(repodir):
readme = open(os.path.join(repodir, 'README.rst')).read()
changelog = open(os.path.join(repodir, 'CHANGES.rst')).read()
return ''.join([
readme, '\n\n',
'CHANGELOG\n',
'=========\n\n',
changelog
])
version = _get_version(REPODIR)
longdesc = _get_longdesc(REPODIR)
setuptools.setup(
name="nosehtmloutput-2",
author='Joel Rivera',
author_email='[email protected]',
url="https://github.com/cyraxjoe/nose-html-output",
download_url="https://github.com/cyraxjoe/nose-html-output/archive/%s.zip" % version,
description="Nose plugin to produce test results in html.",
version=version,
long_description=longdesc,
license="Apache License, Version 2.0",
packages=["htmloutput"],
install_requires=['nose'],
classifiers=[
"Environment :: Console",
"Topic :: Software Development :: Testing",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3"
],
entry_points={
'nose.plugins.0.10': [
'html-output = htmloutput:HtmlOutput'
]
}
)