update README to add support for 2.4. only require elementtree if version is < 2.5

This commit is contained in:
Mike Dirolf 2009-02-20 11:07:27 -05:00
parent f167101a3e
commit 9415161e83
3 changed files with 9 additions and 3 deletions

View File

@ -17,7 +17,7 @@ If you have `setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_ i
Dependencies
============
The PyMongo distribution has been tested on both Python 2.5 and Python 2.6. Additional dependencies are:
The PyMongo distribution has been tested on Python 2.x, where x >= 4. Additional dependencies are:
- `ElementTree <http://effbot.org/zone/element-index.htm>`_ (this is included with Python >= 2.5)
- (to generate documentation) `epydoc <http://epydoc.sourceforge.net/>`_

View File

@ -25,7 +25,7 @@ import base64
try:
import xml.etree.ElementTree as ET
except:
except ImportError:
import elementtree.ElementTree as ET
from code import Code

View File

@ -10,6 +10,12 @@ from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError
from distutils.core import Extension
requirements = []
try:
import xml.etree.ElementTree
except ImportError:
requirements.append("elementtree")
f = open("README.rst")
try:
try:
@ -47,7 +53,7 @@ setup(
url="http://github.com/mongodb/mongo-python-driver",
packages=["pymongo", "gridfs"],
ext_modules=[Extension('pymongo._cbson', ['pymongo/_cbsonmodule.c'])],
install_requires=["elementtree"],
install_requires=requirements,
license="Apache License, Version 2.0",
test_suite="nose.collector",
classifiers=[