Fix pyconcept build

This commit is contained in:
Ivan 2024-07-14 14:02:16 +03:00
parent cc5a605a88
commit ea0946a530

View File

@ -4,6 +4,9 @@ $packageName = 'pyconcept'
$output = "${PSScriptRoot}\..\..\output\py\${packageName}"
$python = '.\venv\Scripts\python.exe'
$scripts = Resolve-Path -Path "${PSScriptRoot}\..\venv\Scripts"
$Env:PATH += ";${scripts}"
$ccl_source = "${PSScriptRoot}\..\..\ccl"
$ccl_destination = "${PSScriptRoot}\..\ccl"
$ccl_include = ('*.cpp','*.hpp','*.h')
@ -70,8 +73,10 @@ function PrepareOutput {
function BuildProject {
Write-Host 'Building project...' -ForegroundColor DarkGreen
& $python -m build --wheel --no-isolation --outdir="${output}"
if ($LASTEXITCODE -eq 0) {
& $python -m build --sdist --no-isolation --outdir="${output}"
}
}
function TestWheel([string] $wheelPath) {
Write-Host 'Running tests...' -ForegroundColor DarkGreen