File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed
Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 33__docformat__ = 'restructuredtext'
44
55try :
6- from . import hashtable , tslib , lib
7- except Exception : # pragma: no cover
8- import sys
9- e = sys .exc_info ()[1 ] # Py25 and Py3 current exception syntax conflict
10- print e
11- if 'No module named lib' in str (e ):
12- raise ImportError ('C extensions not built: if you installed already '
13- 'verify that you are not importing from the source '
14- 'directory' )
15- else :
16- raise
6+ from pandas import hashtable , tslib , lib
7+ except ImportError as e : # pragma: no cover
8+ module = str (e ).lstrip ('cannot import name ' ) # hack but overkill to use re
9+ raise ImportError ("C extensions: {0} not built" .format (module ))
1710
1811from datetime import datetime
1912import numpy as np
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ cdef extern from "src/headers/math.h":
5757 double fabs(double )
5858 int signbit(double )
5959
60- from . import lib
60+ from pandas import lib
6161
6262include " skiplist.pyx"
6363
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import numpy as np
1515
1616cimport tslib
1717from hashtable cimport *
18- from . import algos, tslib, hashtable as _hash
19- from .tslib import Timestamp
18+ from pandas import algos, tslib, hashtable as _hash
19+ from pandas .tslib import Timestamp
2020
2121from datetime cimport (get_datetime64_value, _pydatetime_to_dts,
2222 pandas_datetimestruct)
3434 import pytz
3535 UTC = pytz.utc
3636 have_pytz = True
37- except :
37+ except ImportError :
3838 have_pytz = False
3939
4040PyDateTime_IMPORT
4141
4242cdef extern from " Python.h" :
4343 int PySlice_Check(object )
4444
45- # int PyList_Check(object)
46- # int PyTuple_Check(object)
4745
4846cdef inline is_definitely_invalid_key(object val):
4947 if PyTuple_Check(val):
You can’t perform that action at this time.
0 commit comments