mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-01-18 17:08:48 +00:00
Авто-заполнение почты для streamlit, чтобы он не спрашивал.
This commit is contained in:
parent
5644f2b32b
commit
5b55cd6673
13
setup.py
13
setup.py
@ -12,11 +12,24 @@ if name == "posix":
|
||||
download("https://github.com/ekzhang/bore/releases/download/v0.5.0/bore-v0.5.0-x86_64-unknown-linux-musl.tar.gz", "bore.tar.gz")
|
||||
system("tar -zxvf bore.tar.gz")
|
||||
system("rm -rf bore.tar.gz")
|
||||
|
||||
import getpass
|
||||
user = getpass.getuser()
|
||||
|
||||
system("mkdir ~/.streamlit")
|
||||
with open(f"/home/{user}/.streamlit/credentials.toml", "w") as f:
|
||||
f.write('[general]\nemail = "a@a.a"')
|
||||
f.close()
|
||||
elif name == "nt":
|
||||
from shutil import unpack_archive as unpack
|
||||
download("https://github.com/ekzhang/bore/releases/download/v0.5.0/bore-v0.5.0-x86_64-pc-windows-msvc.zip", "bore.zip")
|
||||
unpack("bore.zip")
|
||||
system("del bore.zip")
|
||||
|
||||
system("mkdir C:\\Users\\windows\\.streamlit")
|
||||
with open("C:\\Users\\windows\\.streamlit\\credentials.toml", "w") as f:
|
||||
f.write('[general]\nemail = "a@a.a"')
|
||||
f.close()
|
||||
else:
|
||||
print("Увы, вероятно Ваша ОС не поддерживается.")
|
||||
print("Завершение работы...")
|
||||
|
Loading…
Reference in New Issue
Block a user