mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1912 from YunoHost/fix-venv-pre-bookworm
remove pkg_resources from pip freeze
This commit is contained in:
commit
845a14bfe1
1 changed files with 2 additions and 1 deletions
|
@ -74,8 +74,9 @@ def _backup_pip_freeze_for_python_app_venvs():
|
||||||
venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/")
|
venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/")
|
||||||
for venv in venvs:
|
for venv in venvs:
|
||||||
# Generate a requirements file from venv
|
# Generate a requirements file from venv
|
||||||
|
# Remove pkg resources from the freeze to avoid an error during the python venv https://stackoverflow.com/a/40167445
|
||||||
os.system(
|
os.system(
|
||||||
f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null"
|
f"{venv}/bin/pip freeze | grep -E -v 'pkg(-|_)resources==' > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue