mirror of
https://github.com/stashapp/CommunityScripts.git
synced 2026-04-13 13:26:42 -05:00
remove indirect pythontoolsintealler from adulttimeinteractive (#398)
Co-authored-by: feederbox826 <feederbox826@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import requests, os, shutil
|
||||
import re, sys, json, time, sysconfig
|
||||
from inspect import getmembers, isfunction
|
||||
import shutil
|
||||
import sys, json, sysconfig
|
||||
from venv import create
|
||||
from os.path import join, expanduser, abspath
|
||||
from os.path import abspath
|
||||
import subprocess
|
||||
import shutil
|
||||
|
||||
@@ -32,18 +31,12 @@ def run(input, output):
|
||||
PLUGIN_DIR = input["server_connection"]["PluginDir"]
|
||||
modeArg = input['args']["mode"]
|
||||
|
||||
try:
|
||||
if modeArg == "" or modeArg == "add":
|
||||
return
|
||||
|
||||
elif modeArg == "process_py_stashapi_tools":
|
||||
get_download_py_stashapp_tools(PLUGIN_DIR)
|
||||
|
||||
except Exception as e:
|
||||
raise
|
||||
output["error"] = str(e)
|
||||
if modeArg == "" or modeArg == "add":
|
||||
return
|
||||
|
||||
elif modeArg == "process_py_stashapi_tools":
|
||||
get_download_py_stashapp_tools(PLUGIN_DIR)
|
||||
|
||||
output["output"] = "ok"
|
||||
|
||||
def get_download_py_stashapp_tools(PLUGIN_DIR):
|
||||
@@ -56,9 +49,9 @@ def get_download_py_stashapp_tools(PLUGIN_DIR):
|
||||
# where requirements.txt is in same dir as this script
|
||||
subprocess.run([f"{used_dir}/venv/bin/pip", "install", "-r", abspath(f"{used_dir}/packages/stashtools.txt")],stdout=None)
|
||||
|
||||
# venv/lib/python3.12/site-packages/stashapp_tools-
|
||||
# venv/lib/python3.11/site-packages/stashapp_tools-
|
||||
|
||||
src = f"{used_dir}/venv/lib/python3.11/site-packages"
|
||||
src = f"{used_dir}/venv/lib/python3.12/site-packages"
|
||||
destination = shutil.copytree(src, org_packagedir,ignore_func,None,shutil.copy2,False,True)
|
||||
fp = open(f'{used_dir}/copydo.txt', 'w+')
|
||||
fp.write("%s\n" % print(destination))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "Python Tools Installer"
|
||||
description: Download stashapp-tools for DockerEnv
|
||||
version: 0.1.
|
||||
version: 0.1.2
|
||||
url: https://github.com/tooliload/StashAppCommunityScripts/tree/main/plugins/PythonToolsInstaller
|
||||
exec:
|
||||
- python
|
||||
|
||||
Reference in New Issue
Block a user