From 5b55cd6673e76bfaef8dc5ee675e732869e49b53 Mon Sep 17 00:00:00 2001 From: none Date: Tue, 27 Feb 2024 23:15:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B2=D1=82=D0=BE-=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=D1=87?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20streamlit,=20=D1=87=D1=82?= =?UTF-8?q?=D0=BE=D0=B1=D1=8B=20=D0=BE=D0=BD=20=D0=BD=D0=B5=20=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D1=88=D0=B8=D0=B2=D0=B0=D0=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup.py b/setup.py index 3c788e8..89ac5ab 100644 --- a/setup.py +++ b/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("Завершение работы...")