Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pkg_resources #592

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading