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

MTP-1980: Upgrade to govuk-frontend 5 and other dependencies #601

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Replace deprecated pkg_resources usage with importlib.metadata
  • Loading branch information
ushkarev committed Jan 11, 2024
commit 798a920ed299fd09790adf1cccc4c2f9a9077c51
14 changes: 5 additions & 9 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@
import mtp_common

# NB: this version does not need to be updated unless mtp_common changes significantly
if mtp_common.VERSION < (10,):
if mtp_common.VERSION < (16,):
raise ImportError
except ImportError:
try:
import pkg_resources
except ImportError:
raise SystemExit('setuptools and pip are required')
try:
pip = pkg_resources.load_entry_point('pip', 'console_scripts', 'pip')
except pkg_resources.ResolutionError:
raise SystemExit('setuptools and pip are required')
import importlib.metadata

(entry_point,) = importlib.metadata.entry_points(name='pip', group='console_scripts')
pip = entry_point.load()

print('Pre-installing MTP-common and base requirements')
pip(['install', '--requirement', f'{root_path}/requirements/base.txt'])
Expand Down