Skip to content

Commit 9aa56cf

Browse files
gregglindwesm
authored andcommitted
One approach to requirements handling
Others could be: * have requirements{2,3}.txt, and read from them with a function
1 parent 7c2fe04 commit 9aa56cf

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

pandas/core/datetools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'install version 1.5!')
1616
except ImportError: # pragma: no cover
1717
print 'Please install python-dateutil via easy_install or some method!'
18+
raise # otherwise a 2nd import won't show the message
1819

1920
import calendar
2021

requirments.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# so python-dateutil2 is for py3!
2+
python-dateutil < 2
3+
numpy
4+

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
except ImportError:
2525
raise ImportError('require setuptools/distribute for Py3k')
2626
setuptools_args = {'use_2to3': True,
27-
'zip_safe': False,}
27+
'zip_safe': False,
28+
'install_requires': ['python-dateutil > 2','numpy'],
29+
}
2830
else:
29-
setuptools_args = {}
30-
31+
setuptools_args = {
32+
'install_requires': ['python-dateutil < 2','numpy'],
33+
}
3134

3235
import numpy as np
3336

0 commit comments

Comments
 (0)