Browse Source

Added google api submodule,

removed package installation at startup
master
Raphael Roberts 7 years ago
parent
commit
57095f7274
  1. 6
      .gitmodules
  2. 2
      endtime.bat
  3. 1
      google_api_wrapper
  4. 12
      install.bat
  5. 1
      secrets
  6. 5
      workers/done.bat
  7. 25
      workers/install.py
  8. 35
      workers/packs.txt

6
.gitmodules

@ -0,0 +1,6 @@
[submodule "google_api_wrapper"]
path = google_api_wrapper
url = https://rlbrhost.ddns.net/git/rlbr/google_api_wrapper
[submodule "secrets"]
path = secrets
url = https://rlbrhost.ddns.net/git/school/secrets.git

2
endtime.bat

@ -1,3 +1,3 @@
@echo off
title endtime
%python% timeout.py
python workers\timeout.py

1
google_api_wrapper

@ -0,0 +1 @@
Subproject commit 78ee774585aa6c8993d24a9fdcc4604dc5522da9

12
install.bat

@ -4,19 +4,19 @@
for %%d in (%~dp0..) do set ParentDirectory=%%~fd
for /f "usebackq tokens=*" %%a in (`dir /B ^| findstr /r /i winpython.*`) do (
set setup=%%a
for /f "usebackq tokens=*" %%a in (`dir /B installer`) do (
set setup=installer\%%a
goto skipA
)
:skipA
set Directory=%~dp0
REM set Directory=%~dp0
"%Directory%\%setup%"
set winpython=%%a
REM set winpython=%%a
for /f "usebackq tokens=*" %%a in (`dir /A:D /B ^| findstr /r /i w.*py.*`) do (
set winpython=%%a
goto skipB
)
:skipBq
:skipB
set winpython="%Directory%\%winpython%"
for /f "usebackq tokens=*" %%a in (`dir /A:D /B %winpython% ^| findstr /r /i python.*`) do (
set exe=%%a
@ -30,4 +30,4 @@ md "%winpython%\settings\.idlerc"
copy config-highlight.cfg %winpython%\settings\.idlerc
md "%appdata%\Notepad++\themes"
copy themes "%appdata%\Notepad++\themes"
%exe% workers\install.py from_pack workers\packs.txt
"%exe%" -m pip install -r %Directory%\google_api_wrapper\requirements.txt

1
secrets

@ -0,0 +1 @@
Subproject commit 9525281bcafcb75d5ccd1c5a0b7e66470743b397

5
workers/done.bat

@ -15,5 +15,6 @@ for /f "usebackq tokens=*" %%a in (`dir /A:D /B %winpython% ^| findstr /r /i pyt
goto skipC
)
:skipC
set exe="%winpython%\%exe%\python.exe"
"%winpython%\t\7z.exe" a -t7z "%ParentDirectory%\python.7z" -p123456789 -mhe=on -mx "%Directory%" -xr!%_winpython% -xr!__pycache__
REM set exe="%winpython%\%exe%\python.exe"
"%winpython%\t\7z.exe" a -t7z "%ParentDirectory%\python.7z" -p123456789 -mhe=on -mx "%Directory%" -xr!%_winpython% -xr!__pycache__
python upload.py

25
workers/install.py

@ -1,25 +0,0 @@
#funcs
import pip._internal as pip
def from_pack(file):
file = open(file)
packages = set(file.read().split('\n')) - set(package.key for package in pip.get_installed_distributions())
file.close()
for package in packages:
pip.main(['install',package])
def to_pack(file):
file = open(file,'w')
s = '\n'.join(map(lambda p: p.key,pip.get_installed_distributions()))
file.write(s)
file.close()
#arguments
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("mode",metavar = "action",help="what you wanna do")
parser.add_argument("path",metavar = "dir",help="fullpath to pack")
args = parser.parse_args()
if args.mode == "to_pack":
to_pack(args.path)
elif args.mode == "from_pack":
from_pack(args.path)

35
workers/packs.txt

@ -1,35 +0,0 @@
winpython
wcwidth
toolz
sympy
symengine
sqlite-bro
six
setuptools
pythonnet
python-snappy
python-dateutil
pyreadline
pyperclip
pyodbc
pygments
pycryptodome
ptpython
prompt-toolkit
pip
pillow
pdfminer.six
partd
parso
mpmath
lxml
locket
joblib
jedi
docopt
dask
cloudpickle
chardet
bs4
brotli
beautifulsoup4
Loading…
Cancel
Save