mirror of
https://github.com/IRBorisov/cctext.git
synced 2025-06-26 21:50:37 +03:00
Fix build script
This commit is contained in:
parent
675798b442
commit
cc5a13dc78
|
@ -1,7 +1,7 @@
|
|||
Set-Location $PSScriptRoot\..
|
||||
|
||||
$packageName = 'cctext'
|
||||
$output = 'dist'
|
||||
$output = "${PSScriptRoot}\..\dist"
|
||||
$python = '.\venv\Scripts\python.exe'
|
||||
|
||||
if (-not (Test-Path -Path ${python} -PathType Leaf)) {
|
||||
|
@ -9,19 +9,19 @@ if (-not (Test-Path -Path ${python} -PathType Leaf)) {
|
|||
& ${python} -m pip install -r requirements-build.txt
|
||||
}
|
||||
|
||||
if (Test-Path -Path $output\$packageName) {
|
||||
Remove-Item $output\$packageName -Recurse -Force
|
||||
if (Test-Path -Path ${output}) {
|
||||
Remove-Item ${output} -Recurse -Force
|
||||
}
|
||||
|
||||
& ${python} -m build --outdir=${output}\
|
||||
$wheel = Get-Childitem -Path ${output}\*.whl -Name
|
||||
& ${python} -m build --outdir="${output}\"
|
||||
$wheel = Get-Childitem -Path "${output}\*.whl" -Name
|
||||
if (-not ${wheel}) {
|
||||
Write-Error "No wheel generated for ${packageName}"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
& ${python} -m pip install -I ${output}\${wheel}
|
||||
& ${python} -m pip install -I "${output}\${wheel}"
|
||||
& ${python} -m unittest
|
||||
$exitcode = $LASTEXITCODE
|
||||
& ${python} -m pip uninstall -y $packageName
|
||||
Exit $exitcode
|
||||
& ${python} -m pip uninstall -y ${packageName}
|
||||
Exit ${exitcode}
|
Loading…
Reference in New Issue
Block a user