diff --git a/pandas/_libs/src/khash.pxd b/pandas/_libs/khash.pxd similarity index 98% rename from pandas/_libs/src/khash.pxd rename to pandas/_libs/khash.pxd index ba9a3c70097b2..b1d965c3618cd 100644 --- a/pandas/_libs/src/khash.pxd +++ b/pandas/_libs/khash.pxd @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# cython: profile=False from cpython cimport PyObject from numpy cimport int64_t, uint64_t, int32_t, uint32_t, float64_t diff --git a/pandas/_libs/tslibs/resolution.pyx b/pandas/_libs/tslibs/resolution.pyx index 0692d985b4877..1c20dbe7f8fc9 100644 --- a/pandas/_libs/tslibs/resolution.pyx +++ b/pandas/_libs/tslibs/resolution.pyx @@ -10,7 +10,7 @@ np.import_array() from util cimport is_string_object, get_nat -from khash cimport ( +from pandas._libs.khash cimport ( khiter_t, kh_destroy_int64, kh_put_int64, kh_init_int64, kh_int64_t, diff --git a/setup.py b/setup.py index 7e56298d1b20b..7faf33b607a09 100755 --- a/setup.py +++ b/setup.py @@ -496,7 +496,7 @@ def pxd(name): 'pyxfile': '_libs/hashing'}, '_libs.hashtable': { 'pyxfile': '_libs/hashtable', - 'pxdfiles': ['_libs/hashtable', '_libs/missing'], + 'pxdfiles': ['_libs/hashtable', '_libs/missing', '_libs/khash'], 'depends': (['pandas/_libs/src/klib/khash_python.h'] + _pxi_dep['hashtable'])}, '_libs.index': { @@ -550,7 +550,6 @@ def pxd(name): '_libs.tslib': { 'pyxfile': '_libs/tslib', 'pxdfiles': ['_libs/src/util', - '_libs/src/khash', '_libs/tslibs/conversion', '_libs/tslibs/timedeltas', '_libs/tslibs/timestamps', @@ -591,12 +590,11 @@ def pxd(name): 'sources': np_datetime_sources}, '_libs.tslibs.parsing': { 'pyxfile': '_libs/tslibs/parsing', - 'pxdfiles': ['_libs/src/util', - '_libs/src/khash']}, + 'pxdfiles': ['_libs/src/util']}, '_libs.tslibs.resolution': { 'pyxfile': '_libs/tslibs/resolution', 'pxdfiles': ['_libs/src/util', - '_libs/src/khash', + '_libs/khash', '_libs/tslibs/frequencies', '_libs/tslibs/timezones'], 'depends': tseries_depends,