Skip to content

Commit 3b3c103

Browse files
committed
Merge pull request #177 from msabramo/require_ordereddict_for_py26
setup.py: Require ordereddict for Python 2.6
2 parents 7cce65b + e76c567 commit 3b3c103

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

setup.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from distutils.core import setup
1+
try:
2+
from setuptools import setup
3+
except ImportError:
4+
from distutils.core import setup
25
import os
36
import codecs
47

@@ -23,6 +26,12 @@
2326
if os.path.isdir(os.path.join('html5lib', name)) and
2427
not name.startswith('.') and name != 'tests']
2528

29+
install_requires = ['six']
30+
try:
31+
from collections import OrderedDict
32+
except ImportError:
33+
install_requires.append('ordereddict')
34+
2635
current_dir = os.path.dirname(__file__)
2736
with codecs.open(os.path.join(current_dir, 'README.rst'), 'r', 'utf8') as readme_file:
2837
with codecs.open(os.path.join(current_dir, 'CHANGES.rst'), 'r', 'utf8') as changes_file:
@@ -38,7 +47,5 @@
3847
maintainer='James Graham',
3948
maintainer_email='james@hoppipolla.co.uk',
4049
packages=packages,
41-
install_requires=[
42-
'six',
43-
],
50+
install_requires=install_requires,
4451
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy