forked from html5lib/html5lib-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
72 lines (64 loc) · 2.77 KB
/
setup.py
File metadata and controls
72 lines (64 loc) · 2.77 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
import codecs
from os.path import join, dirname
from setuptools import setup, find_packages
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Markup :: HTML'
]
here = dirname(__file__)
with codecs.open(join(here, 'README.rst'), 'r', 'utf8') as readme_file:
with codecs.open(join(here, 'CHANGES.rst'), 'r', 'utf8') as changes_file:
long_description = readme_file.read() + '\n' + changes_file.read()
version = None
with open(join(here, 'html5lib', '__init__.py')) as fp:
for line in fp:
_locals = {}
if line.startswith('__version__'):
exec(line, None, _locals)
version = _locals['__version__']
break
setup(name='html5lib',
version=version,
url='https://github.com/html5lib/html5lib-python',
license="MIT License",
description='HTML parser based on the WHATWG HTML specification',
long_description=long_description,
classifiers=classifiers,
maintainer='James Graham',
maintainer_email='james@hoppipolla.co.uk',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=[
'six',
'webencodings',
],
extras_require={
# A empty extra that only has a conditional marker will be
# unconditonally installed when the condition matches.
":python_version == '2.6'": ["ordereddict"],
# A conditional extra will only install these items when the extra is
# requested and the condition matches.
"datrie:platform_python_implementation == 'CPython'": ["datrie"],
"lxml:platform_python_implementation == 'CPython'": ["lxml"],
# Standard extras, will be installed when the extra is requested.
"genshi": ["genshi"],
"chardet": ["chardet>=2.2"],
# The all extra combines a standard extra which will be used anytime
# the all extra is requested, and it extends it with a conditional
# extra that will be installed whenever the condition matches and the
# all extra is requested.
"all": ["genshi", "chardet>=2.2"],
"all:platform_python_implementation == 'CPython'": ["datrie", "lxml"],
},
)