File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 11param (
2- [switch ] $InstallRequirements ,
3- [switch ] $InstallPyInstaller ,
2+ [switch ] $Init ,
43 [switch ] $Clean ,
54 [switch ] $Compile
65)
76Set-Location $PSScriptRoot
87$didSomething = $false
98
10- if ($InstallRequirements -or $InstallPyInstaller ) {
11- & py - m pip install -- user -- upgrade pip
12- }
13- if ($InstallRequirements ) {
14- & py - m pip install -- user -- upgrade - r ./ requirements.txt
15- # The 'python3-tk' package is also required on Linux.
16- $didSomething = $true
17- }
18- if ($InstallPyInstaller ) {
19- & py - m pip install -- user -- upgrade pyinstaller
9+ if ($Init ) {
10+ & py - m venv ./ .venv
11+ . ./ .venv/ Scripts/ Activate.ps1
12+
13+ & ./ .venv/ Scripts/ python - m pip install -- upgrade pip
14+ & ./ .venv/ Scripts/ python - m pip install -- upgrade - r ./ requirements.txt
15+ & ./ .venv/ Scripts/ python - m pip install -- upgrade pyinstaller
2016 $didSomething = $true
2117}
18+
2219if ($Clean ) {
2320 Remove-Item - Recurse - ErrorAction Ignore ./ dist
2421 $didSomething = $true
2522}
2623if ($Compile ) {
27- & py - m PyInstaller -- specpath ./ build ./ vk_inviter.py
24+ & . / .venv / Scripts / pyinstaller -- specpath ./ build ./ vk_inviter.py
2825 Remove-Item - Recurse - ErrorAction Ignore ./ build, ./ __pycache__
2926 Remove-Item ' ./dist/vk_inviter/MSVCP140.dll' , `
3027 ' ./dist/vk_inviter/VCRUNTIME140.dll' , `
You can’t perform that action at this time.
0 commit comments