Skip to content

Commit 55d92f3

Browse files
committed
Updated dependency information for dateutil-2.1 support.
This has become quite messy, to the point that I had a little look for a hackable replacement.
1 parent 63d0a7c commit 55d92f3

5 files changed

Lines changed: 15 additions & 11 deletions

File tree

doc/install.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ handling [#]_. :pypi:`simplejson` is also required when using :mod:`github2`
3333
with Python 2.4 or 2.5. If you install via :pypi:`pip` or :pypi:`easy_install
3434
<setuptools>` the dependencies should be installed automatically for you.
3535

36-
.. [#] You must use :pypi:`python-dateutil` 1.x when working with Python 2.x,
37-
the latest 2.x releases are for Python 3.x installations only.
36+
.. [#] You must use :pypi:`python-dateutil` 1.x when working with Python 2.5 or
37+
earlier, the latest 2.x releases are for Python 2.6 and newer
38+
installations only.

extra/requirements-py25.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
-r requirements.txt
2-
simplejson>=2.0.9
1+
httplib2 >= 0.7.0
2+
python-dateutil < 2.0, >= 2.1
3+
simplejson >= 2.0.9

extra/requirements-py3.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

extra/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
httplib2>=0.7.0
2-
python-dateutil<2.0
1+
httplib2 >= 0.7.0
2+
python-dateutil < 2.0

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
if sys.version_info[:2] < (2, 6):
2424
install_requires.append('simplejson >= 2.0.9')
2525

26-
if sys.version_info >= (3,):
27-
install_requires.append('python-dateutil >= 2.0')
28-
else:
26+
# dateutil supports python 2.x in dateutil-1, python 3.x in dateutil-2.0 and
27+
# python 2.6+ in dateutil-2.1. Exciting…
28+
if sys.version_info[:2] <= (2, 5):
2929
install_requires.append('python-dateutil < 2.0')
30+
elif sys.version_info < (3, ):
31+
install_requires.append('python-dateutil < 2.0, >= 2.1')
32+
else:
33+
install_requires.append('python-dateutil > 2.0')
3034

3135
long_description = (codecs.open('README.rst', "r", "utf-8").read()
3236
+ "\n" + codecs.open('NEWS.rst', "r", "utf-8").read())

0 commit comments

Comments
 (0)