From 3732e7a4369a7d751d4e4215e46252607c78ec2b Mon Sep 17 00:00:00 2001 From: mbaak Date: Thu, 28 Dec 2023 09:59:52 +0100 Subject: [PATCH] FIX: get rid of usage of deprecated pkg_resources --- phik/resources.py | 13 ++++++------- pyproject.toml | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/phik/resources.py b/phik/resources.py index ecd99d6..d8faae8 100644 --- a/phik/resources.py +++ b/phik/resources.py @@ -15,17 +15,16 @@ """ import pathlib -from pkg_resources import resource_filename -import phik +from pathlib import Path + +ROOT_DIRECTORY = Path(__file__).resolve().parent + # Fixtures -_FIXTURE = { - _.name: _ for _ in pathlib.Path(resource_filename(phik.__name__, "data")).glob("*") -} +_FIXTURE = {_.name: _ for _ in pathlib.Path(ROOT_DIRECTORY / "data").glob("*")} # Tutorial notebooks _NOTEBOOK = { - _.name: _ - for _ in pathlib.Path(resource_filename(phik.__name__, "notebooks")).glob("*.ipynb") + _.name: _ for _ in pathlib.Path(ROOT_DIRECTORY / "notebooks").glob("*.ipynb") } # Resource types diff --git a/pyproject.toml b/pyproject.toml index aa1a4e2..7ad2713 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,6 @@ dependencies = [ "pandas>=0.25.1", "matplotlib>=2.2.3", "joblib>=0.14.1", - "setuptools>=68;python_version=='3.12'", ] [project.optional-dependencies]