importsysifsys.version_info[:2]>=(3,8):# TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`fromimportlib.metadataimportPackageNotFoundError,version# pragma: no coverelse:fromimportlib_metadataimportPackageNotFoundError,version# pragma: no covertry:# Change here if project is renamed and does not equal the package namedist_name=__name____version__=version(dist_name)exceptPackageNotFoundError:# pragma: no cover__version__="unknown"finally:delversion,PackageNotFoundErrorfrom.classesimportParameters,Index,GenericIndexfrom.annoyimportAnnoyParameters,AnnoyIndexfrom.build_indeximportbuild_indexfrom.define_builderimportdefine_builderfrom.exhaustiveimportExhaustiveParameters,ExhaustiveIndexfrom.find_distanceimportfind_distancefrom.find_knnimportfind_knnfrom.find_neighborsimportfind_neighborsfrom.hnswimportHnswParameters,HnswIndexfrom.kmknnimportKmknnParameters,KmknnIndexfrom.query_distanceimportquery_distancefrom.query_knnimportquery_knnfrom.query_neighborsimportquery_neighborsfrom.vptreeimportVptreeParameters,VptreeIndex
[docs]defincludes()->str:"""Provides access to ``knncolle_py.h`` C++ header. Returns: Path to a directory containing the header. """importosimportinspectdirname=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))returnos.path.join(dirname,"include")