mirror of
https://github.com/IRBorisov/cctext.git
synced 2025-06-25 21:20:36 +03:00
Fix build and add py.typed
This commit is contained in:
parent
61815e7628
commit
e7331dd34e
0
cctext/py.typed
Normal file
0
cctext/py.typed
Normal file
|
@ -3,24 +3,25 @@ Set-Location $PSScriptRoot\..
|
|||
$packageName = 'cctext'
|
||||
$output = 'dist'
|
||||
$python = '.\venv\Scripts\python.exe'
|
||||
if (-not (Test-Path -Path $python -PathType Leaf)) {
|
||||
|
||||
if (-not (Test-Path -Path ${python} -PathType Leaf)) {
|
||||
& 'python' -m venv .\venv
|
||||
& $python -m pip install -r requirements-build.txt
|
||||
& ${python} -m pip install -r requirements-build.txt
|
||||
}
|
||||
|
||||
if (Test-Path -Path $output\$packageName) {
|
||||
Remove-Item $output\$packageName -Recurse -Force
|
||||
}
|
||||
|
||||
& $python -m build --outdir=$output\
|
||||
$wheel = Get-Childitem -Path $output\*.whl -Name
|
||||
if (-not $wheel) {
|
||||
Write-Error "No wheel generated for $packageName"
|
||||
& ${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 unittest
|
||||
& ${python} -m pip install -I ${output}\${wheel}
|
||||
& ${python} -m unittest
|
||||
$exitcode = $LASTEXITCODE
|
||||
& $python -m pip uninstall -y $packageName
|
||||
& ${python} -m pip uninstall -y $packageName
|
||||
Exit $exitcode
|
Loading…
Reference in New Issue
Block a user