[requirements] have manage.py ensure requirements are up to date
This commit is contained in:
parent
77512fc73c
commit
f3bdb36ca8
1 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -11,6 +12,19 @@ def main():
|
||||||
|
|
||||||
from configurations.management import execute_from_command_line
|
from configurations.management import execute_from_command_line
|
||||||
|
|
||||||
|
try:
|
||||||
|
import pip_lock
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
raise ModuleNotFoundError(
|
||||||
|
"Couldn't import pip-lock. Are you on the right virtualenv and up to date?"
|
||||||
|
)
|
||||||
|
|
||||||
|
requirements_path = str(Path(__file__).parent.parent / "requirements/base.txt")
|
||||||
|
pip_lock.check_requirements(
|
||||||
|
requirements_path,
|
||||||
|
post_text="\nRun the following:\n\npython -m pip install -r requirements/base.txt\n",
|
||||||
|
)
|
||||||
|
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue