forked from matthewwithanm/python-markdownify
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
96 lines (80 loc) · 2.58 KB
/
Copy pathsetup.py
File metadata and controls
96 lines (80 loc) · 2.58 KB
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
91
92
93
94
95
96
#/usr/bin/env python
importcodecs
importos
fromsetuptoolsimportsetup, find_packages
fromsetuptools.command.testimporttestasTestCommand, Command
read=lambdafilepath: codecs.open(filepath, 'r', 'utf-8').read()
pkgmeta= {
'__title__': 'markdownify',
'__author__': 'Matthew Tretter',
'__version__': '0.4.1',
}
classPyTest(TestCommand):
deffinalize_options(self):
TestCommand.finalize_options(self)
self.test_args= ['tests', '-s']
self.test_suite=True
defrun_tests(self):
importpytest
errno=pytest.main(self.test_args)
raiseSystemExit(errno)
classLintCommand(Command):
"""
A copy of flake8's Flake8Command
"""
description="Run flake8 on modules registered in setuptools"
user_options= []
definitialize_options(self):
pass
deffinalize_options(self):
pass
defdistribution_files(self):
ifself.distribution.packages:
forpackageinself.distribution.packages:
yieldpackage.replace(".", os.path.sep)
ifself.distribution.py_modules:
forfilenameinself.distribution.py_modules:
yield"%s.py"%filename
defrun(self):
fromflake8.engineimportget_style_guide
flake8_style=get_style_guide(config_file='setup.cfg')
paths=self.distribution_files()
report=flake8_style.check_files(paths)
raiseSystemExit(report.total_errors>0)
setup(
name='markdownify',
description='Convert HTML to markdown.',
long_description=read(os.path.join(os.path.dirname(__file__), 'README.rst')),
version=pkgmeta['__version__'],
author=pkgmeta['__author__'],
author_email='m@tthewwithanm.com',
url='http://github.com/matthewwithanm/python-markdownify',
download_url='http://github.com/matthewwithanm/python-markdownify/tarball/master',
packages=find_packages(),
zip_safe=False,
include_package_data=True,
setup_requires=[
'flake8',
],
tests_require=[
'pytest',
],
install_requires=[
'beautifulsoup4', 'six'
],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Utilities'
],
cmdclass={
'test': PyTest,
'lint': LintCommand,
},
)