mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-22 04:45:05 +00:00
Merge branch 'main' into dev
This commit is contained in:
commit
dac9f2cdff
5 changed files with 22 additions and 5 deletions
|
@ -4,6 +4,11 @@
|
|||
* Change requirements for pure py3
|
||||
|
||||
|
||||
### 3.27.4 (2023-02-15 13:30:00 UTC)
|
||||
|
||||
* Fix updating with running virtualenv
|
||||
|
||||
|
||||
### 3.27.3 (2023-02-15 02:00:00 UTC)
|
||||
|
||||
* Fix reading legacy autoProcessTV.cfg
|
||||
|
|
|
@ -272,7 +272,7 @@
|
|||
#end for
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="extras">the above info may help with packages that don't update internally<br>manual installation tip: <code>python -m pip install -U --user package</code></p>
|
||||
<p class="extras">the above info may help with packages that don't update internally<br>manual installation tip: <code>python -m pip install -U #echo $pip_user_arg#package</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
|
|
@ -1733,3 +1733,13 @@ def iterate_chunk(lst, n):
|
|||
"""
|
||||
for i in moves.range(0, len(lst), n):
|
||||
yield lst[i:i + n]
|
||||
|
||||
|
||||
def is_virtualenv():
|
||||
# type: (...) -> bool
|
||||
"""
|
||||
:return: True if virtualenv Python environment is detected
|
||||
"""
|
||||
"""Get base/real prefix, or `sys.prefix` if there is none."""
|
||||
get_base_prefix_compat = getattr(sys, 'base_prefix', None) or getattr(sys, 'real_prefix', None) or sys.prefix
|
||||
return get_base_prefix_compat != sys.prefix
|
||||
|
|
|
@ -8,7 +8,7 @@ import os
|
|||
import re
|
||||
|
||||
from json_helper import json_loads
|
||||
from sg_helpers import cmdline_runner
|
||||
from sg_helpers import cmdline_runner, is_virtualenv
|
||||
|
||||
from _23 import filter_list, ordered_dict
|
||||
from six import iteritems, PY2
|
||||
|
@ -97,7 +97,7 @@ def initial_requirements():
|
|||
run_pip(['uninstall', '-r', 'recommended-remove.txt'])
|
||||
raise ValueError
|
||||
except (BaseException, ImportError):
|
||||
run_pip(['install', '-U', '--user', '-r', 'requirements.txt'])
|
||||
run_pip(['install', '-U'] + (['--user'], [])[is_virtualenv()] + ['-r', 'requirements.txt'])
|
||||
module = 'Cheetah'
|
||||
try:
|
||||
locals()[module] = __import__(module)
|
||||
|
@ -319,7 +319,8 @@ def pip_update(loading_msg, updates_todo, data_dir):
|
|||
# exclude Cheetah3 to prevent `No matching distro found` and fallback to its legacy setup.py installer
|
||||
output, err, exit_status = run_pip(['install', '-U']
|
||||
+ ([], ['--only-binary=:all:'])[cur_project_name not in ('Cheetah3', )]
|
||||
+ ['--user', '-r', piper_path, '--extra-index-url',
|
||||
+ (['--user'], [])[is_virtualenv()]
|
||||
+ ['-r', piper_path, '--extra-index-url',
|
||||
'https://gitlab+deploy-token-1599941:UNupqjtDab_zxNzvP2gA@gitlab.com/api/'
|
||||
'v4/projects/279215/packages/pypi/simple'])
|
||||
pip_version = None
|
||||
|
|
|
@ -39,7 +39,7 @@ from exceptions_helper import ex, MultipleShowObjectsException
|
|||
import exceptions_helper
|
||||
from json_helper import json_dumps, json_loads
|
||||
import sg_helpers
|
||||
from sg_helpers import remove_file, scantree
|
||||
from sg_helpers import remove_file, scantree, is_virtualenv
|
||||
|
||||
import sickgear
|
||||
from . import classes, clients, config, db, helpers, history, image_cache, logger, name_cache, naming, \
|
||||
|
@ -7934,6 +7934,7 @@ class ConfigGeneral(Config):
|
|||
t.request_host = helpers.xhtml_escape(self.request.host_name, False)
|
||||
api_keys = '|||'.join([':::'.join(a) for a in sickgear.API_KEYS])
|
||||
t.api_keys = api_keys and sickgear.API_KEYS or []
|
||||
t.pip_user_arg = ('--user ', '')[is_virtualenv()]
|
||||
if 'git' == sickgear.update_software_scheduler.action.install_type:
|
||||
# noinspection PyProtectedMember
|
||||
sickgear.update_software_scheduler.action.updater._find_installed_version()
|
||||
|
|
Loading…
Reference in a new issue