Skip to content

Commit

Permalink
Remove use of pkg_resource
Browse files Browse the repository at this point in the history
This import is causing warning messages in all programs that import this
library.
  • Loading branch information
JHolba committed Oct 23, 2023
1 parent d9fc6b7 commit 7d9a800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -14,8 +14,8 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import pkg_resources
import datetime
from importlib import metadata

# -- Project information -----------------------------------------------------

Expand All @@ -26,7 +26,7 @@
# The short X.Y version
import ecl2df # noqa

release = pkg_resources.get_distribution("ecl2df").version
release = metadata.version("ecl2df")
version = release

# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions ecl2df/hook_implementations/jobs.py
@@ -1,8 +1,7 @@
import importlib
import sys
from pathlib import Path

from pkg_resources import resource_filename

try:
from ert.shared.plugins.plugin_manager import hook_implementation
from ert.shared.plugins.plugin_response import plugin_response
Expand All @@ -19,7 +18,7 @@ def decorator(func):


def _get_jobs_from_directory(directory):
resource_directory = Path(resource_filename("ecl2df", directory))
resource_directory = Path(sys.modules["ecl2df"].__file__).parent / directory

all_files = [
resource_directory / filename
Expand Down

0 comments on commit 7d9a800

Please sign in to comment.