forked from jarrekk/imgkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (53 loc) · 1.7 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
# -*- coding: utf-8 -*-
from distutils.core import setup
from setuptools.command.test import test
import os
import sys
import imgkit
class PyTest(test):
def finalize_options(self):
test.finalize_options(self)
self.test_args = ['imgkit-tests.py']
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
os.chdir('tests/')
err_no = pytest.main(self.test_args)
sys.exit(err_no)
def long_description():
try:
import pypandoc
long_desc = pypandoc.convert_file('README.md', 'rst')
long_desc += '\n' + pypandoc.convert_file('AUTHORS.md', 'rst')
except Exception as e:
print(e)
long_desc = imgkit.__doc__.strip()
return long_desc
setup(
name='imgkit',
version=imgkit.__version__,
description=imgkit.__doc__.strip(),
long_description=long_description(),
download_url='https://github.com/jarrekk/imgkit',
license=imgkit.__license__,
tests_require=['pytest'],
cmdclass={'test': PyTest},
packages=['imgkit'],
author=imgkit.__author__,
author_email=imgkit.__contact__,
url=imgkit.__homepage__,
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Text Processing',
'Topic :: Text Processing :: General',
'Topic :: Text Processing :: Markup',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Text Processing :: Markup :: XML',
'Topic :: Utilities'
]
)