diff --git a/.github/workflows/build-wheels-oobabooga.yml b/.github/workflows/build-wheels-oobabooga.yml index 8b52ad10..06cb869f 100644 --- a/.github/workflows/build-wheels-oobabooga.yml +++ b/.github/workflows/build-wheels-oobabooga.yml @@ -175,10 +175,10 @@ jobs: New-Item 'pyproject.toml' -itemType File -value $newpyproject -force New-Item 'CMakeLists.txt' -itemType File -value $cmakelists.Replace('llama_cpp','llama_cpp_cuda') -force - if ($packageVersion -gt [version]'0.2.13' -and $packageVersion -lt [version]'0.2.19') + if ($packageVersion -gt [version]'0.2.13') { - $pyScripts = (dir '.\llama_cpp_cuda\*.py') - $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (cat $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) + $pyScripts = (Get-ChildItem $(Join-Path '.' 'llama_cpp_cuda' '*.py')) + $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (Get-Content $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) } - name: Build Wheel diff --git a/.github/workflows/build-wheels-rocm-full.yml b/.github/workflows/build-wheels-rocm-full.yml index 4d7da9c2..115a69dd 100644 --- a/.github/workflows/build-wheels-rocm-full.yml +++ b/.github/workflows/build-wheels-rocm-full.yml @@ -170,10 +170,10 @@ jobs: New-Item 'pyproject.toml' -itemType File -value $newpyproject -force New-Item 'CMakeLists.txt' -itemType File -value $cmakelists.Replace('llama_cpp','llama_cpp_cuda') -force - if ($packageVersion -gt [version]'0.2.13' -and $packageVersion -lt [version]'0.2.19') + if ($packageVersion -gt [version]'0.2.13') { - $pyScripts = (dir '.\llama_cpp_cuda\*.py') - $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (cat $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) + $pyScripts = (Get-ChildItem $(Join-Path '.' 'llama_cpp_cuda' '*.py')) + $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (Get-Content $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) } - name: Build Wheel