Skip to content

Commit

Permalink
python: purge packages on update
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 29, 2023
1 parent 145f116 commit fa8056d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion server/python/plugin_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,18 @@ def onProxySerialization(value: Any, proxyId: str):
pass

if need_pip:
shutil.rmtree(python_prefix)
try:
for de in os.listdir(plugin_volume):
if de.startswith('linux') or de.startswith('darwin') or de.startswith('win32') or de.startswith('python') or de.startswith('node'):
filePath = os.path.join(plugin_volume, de)
print('Removing old dependencies: %s' % filePath)
try:
shutil.rmtree(filePath)
except:
pass
except:
pass

os.makedirs(python_prefix)

print('requirements.txt (outdated)')
Expand Down

0 comments on commit fa8056d

Please sign in to comment.