Skip to content

Commit

Permalink
Remove usage of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Nov 5, 2024
1 parent 213bb61 commit 35dd060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions omero/plugins/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from omero_ext.argparse import SUPPRESS

from omero_ext.path import path
from pkg_resources import resource_string
from importlib_resources import files

from omero.install.windows_warning import windows_warning, WINDOWS_WARNING

Expand Down Expand Up @@ -342,8 +342,8 @@ def config(self, args, settings):
if settings.APPLICATION_SERVER not in settings.WSGI_TYPES:
self.ctx.die(679, "Web template configuration requires" "wsgi or wsgi-tcp.")

template_file = "%s.conf.template" % server
c = resource_string("omeroweb", "templates/" + template_file).decode("utf-8")
template_file = "templates/%s.conf.template" % server
c = files("omeroweb").joinpath(template_file).read_text()
self.ctx.out(c % d)

def syncmedia(self, args):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def read(fname):
"pytz",
"portalocker",
"packaging",
"importlib-resources",
],
include_package_data=True,
tests_require=["pytest"],
Expand Down

0 comments on commit 35dd060

Please sign in to comment.