Skip to content

Commit

Permalink
Merge pull request #592 from jburel/remove_pkg
Browse files Browse the repository at this point in the history
Replace pkg_resources
  • Loading branch information
knabar authored Nov 19, 2024
2 parents 2755194 + 721002a commit 63d902a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def read(fname):
# minimum requirements for `omero web start`
"concurrent-log-handler>=0.9.20",
"Django>=4.2.3,<4.3",
"django-pipeline==2.1.0",
"django-pipeline",
"django-cors-headers==3.7.0",
"whitenoise>=5.3.0",
"gunicorn>=19.3",
Expand All @@ -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 63d902a

Please sign in to comment.