Skip to content

Commit 3652af3

Browse files
committed
edit pyproject win
1 parent 75537f8 commit 3652af3

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

.github/workflows/build-wheels.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,16 @@ jobs:
7676
if: runner.os == 'Windows'
7777
shell: pwsh
7878
run: |
79-
$filePath = "pyproject.toml"
80-
$newContent = 'cmake.args = [
81-
"-DPYTHON_BUILD_SETUP=ON",
82-
"-DHIPO=ON",
83-
"-DBUILD_OPENBLAS=ON"
84-
]'
85-
86-
# Read file, replace the block, and write back
87-
$fileContent = Get-Content $filePath -Raw
88-
$regex = "(?s)cmake\.args = \[\s*?\"-DPYTHON_BUILD_SETUP=ON\".*?\]"
89-
$updatedContent = $fileContent -replace $regex, $newContent
90-
91-
$updatedContent | Set-Content $filePath
92-
93-
echo "--- pyproject.toml content after Windows edit ---"
94-
Get-Content $filePath
79+
$content = Get-Content pyproject.toml -Raw
80+
$newContent = $content -replace 'cmake\.args = \[\s*"-DPYTHON_BUILD_SETUP=ON"\s*\]', @"
81+
cmake.args = [
82+
"-DPYTHON_BUILD_SETUP=ON",
83+
"-DHIPO=ON",
84+
"-DBUILD_OPENBLAS=ON"
85+
]
86+
"@
87+
$newContent | Set-Content pyproject.toml
88+
cat pyproject.toml
9589
9690
- name: Build wheels
9791
uses: pypa/[email protected]

0 commit comments

Comments
 (0)