Revert "Use pkg_resources
to determine package versions"
This reverts commit f6f2a53a0c
.
This commit is contained in:
parent
94d7836321
commit
610e1666c0
|
@ -28,7 +28,6 @@ import six
|
|||
import json
|
||||
import datetime
|
||||
import logging
|
||||
import pkg_resources
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
|
||||
|
@ -169,11 +168,7 @@ def before_render(event):
|
|||
|
||||
renderer_globals = event
|
||||
renderer_globals['rattail_app'] = request.rattail_config.get_app()
|
||||
|
||||
renderer_globals['app_title'] = request.rattail_config.app_title()
|
||||
pkg = rattail_config.app_package()
|
||||
renderer_globals['app_version'] = pkg_resources.get_distribution(pkg).version
|
||||
|
||||
renderer_globals['h'] = helpers
|
||||
renderer_globals['url'] = request.route_url
|
||||
renderer_globals['rattail'] = rattail
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
Various common views
|
||||
"""
|
||||
|
||||
import importlib
|
||||
import os
|
||||
import pkg_resources
|
||||
from collections import OrderedDict
|
||||
|
||||
from rattail.batch import consume_batch_id
|
||||
|
@ -108,7 +108,8 @@ class CommonView(View):
|
|||
return self.project_version
|
||||
|
||||
pkg = self.rattail_config.app_package()
|
||||
return pkg_resources.get_distribution(pkg).version
|
||||
mod = importlib.import_module(pkg)
|
||||
return mod.__version__
|
||||
|
||||
def exception(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue