Skip to content

Commit

Permalink
Cleanup cimports (pandas-dev#18556)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and jreback committed Dec 3, 2017
1 parent bd9a3e0 commit 6e56195
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pandas/_libs/src/inference.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from decimal import Decimal
cimport util
cimport cython
from tslibs.nattype import NaT
from tslib cimport convert_to_tsobject
from tslibs.conversion cimport convert_to_tsobject
from tslibs.timedeltas cimport convert_to_timedelta64
from tslibs.timezones cimport get_timezone
from datetime import datetime, timedelta
Expand Down
3 changes: 0 additions & 3 deletions pandas/_libs/tslib.pxd

This file was deleted.

10 changes: 4 additions & 6 deletions pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# distutils: define_macros=CYTHON_TRACE_NOGIL=0

cimport numpy as np
from numpy cimport int64_t, import_array, ndarray, float64_t
from numpy cimport int64_t, ndarray, float64_t
import numpy as np
np.import_array()


from cpython cimport PyTypeObject, PyFloat_Check
Expand Down Expand Up @@ -35,18 +36,15 @@ from tslibs.np_datetime cimport (check_dts_bounds,
dayofweek, is_leapyear)
from tslibs.np_datetime import OutOfBoundsDatetime

from .tslibs.parsing import parse_datetime_string
from tslibs.parsing import parse_datetime_string

cimport cython
from cython cimport Py_ssize_t

import warnings

import pytz
UTC = pytz.utc

# initialize numpy
import_array()


from tslibs.timedeltas cimport cast_from_unit
from tslibs.timedeltas import Timedelta
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ def pxd(name):
'depends': _pxi_dep['join']},
'_libs.lib': {
'pyxfile': '_libs/lib',
'pxdfiles': ['_libs/src/util', '_libs/missing'],
'pxdfiles': ['_libs/src/util',
'_libs/missing',
'_libs/tslibs/conversion'],
'depends': lib_depends + tseries_depends},
'_libs.missing': {
'pyxfile': '_libs/missing',
Expand Down

0 comments on commit 6e56195

Please sign in to comment.