File tree 3 files changed +8
-17
lines changed
3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 3
3
__docformat__ = 'restructuredtext'
4
4
5
5
try :
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 ))
17
10
18
11
from datetime import datetime
19
12
import numpy as np
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ cdef extern from "src/headers/math.h":
57
57
double fabs(double )
58
58
int signbit(double )
59
59
60
- from . import lib
60
+ from pandas import lib
61
61
62
62
include " skiplist.pyx"
63
63
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import numpy as np
15
15
16
16
cimport tslib
17
17
from 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
20
20
21
21
from datetime cimport (get_datetime64_value, _pydatetime_to_dts,
22
22
pandas_datetimestruct)
34
34
import pytz
35
35
UTC = pytz.utc
36
36
have_pytz = True
37
- except :
37
+ except ImportError :
38
38
have_pytz = False
39
39
40
40
PyDateTime_IMPORT
41
41
42
42
cdef extern from " Python.h" :
43
43
int PySlice_Check(object )
44
44
45
- # int PyList_Check(object)
46
- # int PyTuple_Check(object)
47
45
48
46
cdef inline is_definitely_invalid_key(object val):
49
47
if PyTuple_Check(val):
You can’t perform that action at this time.
0 commit comments