Skip to content

Commit

Permalink
Remove the use of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
pablormier committed May 7, 2024
1 parent c8063a9 commit 4ac6c63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions corneto/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@ def info():

if supports_html():
import base64
from importlib.resources import files

import pkg_resources
from IPython.core.display import display
from IPython.display import HTML

logo_path = pkg_resources.resource_filename(__name__, "resources/logo.png")
# logo_path = pkg_resources.resource_filename(__name__, "resources/logo.png")
logo_path = files("corneto").joinpath("resources/logo.png")

with open(logo_path, "rb") as f:
img_bytes = f.read()
b64img = base64.b64encode(img_bytes).decode("utf-8")
Expand Down

0 comments on commit 4ac6c63

Please sign in to comment.