Skip to content

Commit 779736e

Browse files
committed
win: switch to pwsh
1 parent e01907a commit 779736e

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

.github/workflows/build_wheels_and_release.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,15 @@ jobs:
2424
with:
2525
python-version: "3.10"
2626

27-
- name: Display Python version
28-
shell: cmd
29-
run: |
30-
"C:\Program Files\PowerShell\7\pwsh.exe" -Command "$env:PATH; Get-Command python; python --version; python -c 'import sys; print(sys.executable)'"
31-
3227
- name: Install cibuildwheel
33-
shell: cmd
34-
run: |
35-
"C:\Program Files\PowerShell\7\pwsh.exe" -Command "python -m pip install --upgrade pip; pip install cibuildwheel==2.20.0"
28+
run: pip install cibuildwheel==2.20.0
3629

3730
- name: Build wheels
38-
shell: cmd
3931
run: |
40-
"C:\Program Files\PowerShell\7\pwsh.exe" -Command "python -m cibuildwheel --output-dir wheelhouse"
32+
python -m cibuildwheel --output-dir wheelhouse
4133
env:
4234
CIBW_BUILD_VERBOSITY: "1"
4335
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
44-
CIBW_BEFORE_ALL_WINDOWS: >
45-
cmd /c ""C:\Program Files\PowerShell\7\pwsh.exe" -Command "
46-
Invoke-WebRequest -Uri 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe' -OutFile 'miniconda.exe';
47-
Start-Process -FilePath 'miniconda.exe' -ArgumentList '/S','/D=$env:UserProfile\Miniconda3' -Wait;
48-
$env:PATH = '$env:UserProfile\Miniconda3;$env:UserProfile\Miniconda3\Scripts;$env:UserProfile\Miniconda3\Library\bin;' + $env:PATH;
49-
& $env:UserProfile\Miniconda3\Scripts\activate.ps1;
50-
conda config --add channels conda-forge;
51-
conda config --set channel_priority strict;
52-
conda install -y -c conda-forge sleef
53-
""
5436
working-directory: ./quaddtype
5537

5638
- uses: actions/upload-artifact@v2

quaddtype/pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ repair-wheel-command = "delocate-wheel -w {dest_dir} -v {wheel}"
8383

8484
[tool.cibuildwheel.windows]
8585
before-all = [
86-
"C:\\Program Files\\PowerShell\\7\\pwsh.EXE -Command \"$env:PATH; Get-Command python; python -c 'import sys; print(sys.executable)'\"",
87-
"C:\\Program Files\\PowerShell\\7\\pwsh.EXE -Command \"Invoke-WebRequest -Uri 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe' -OutFile 'miniconda.exe'\"",
88-
"start /wait \"\" miniconda.exe /S /D=%UserProfile%\\Miniconda3",
89-
"C:\\Program Files\\PowerShell\\7\\pwsh.EXE -Command \"$env:PATH = '$env:UserProfile\\Miniconda3;$env:UserProfile\\Miniconda3\\Scripts;$env:UserProfile\\Miniconda3\\Library\\bin;' + $env:PATH\"",
90-
"C:\\Program Files\\PowerShell\\7\\pwsh.EXE -Command \"& $env:UserProfile\\Miniconda3\\Scripts\\activate.ps1\"",
91-
"C:\\Program Files\\PowerShell\\7\\pwsh.EXE -Command \"conda config --add channels conda-forge; conda config --set channel_priority strict; conda install -y -c conda-forge sleef\""
86+
"Invoke-WebRequest -Uri 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe' -OutFile 'miniconda.exe'",
87+
"Start-Process -FilePath 'miniconda.exe' -ArgumentList '/S','/D=$env:UserProfile\\Miniconda3' -Wait",
88+
"$env:PATH = '$env:UserProfile\\Miniconda3;$env:UserProfile\\Miniconda3\\Scripts;$env:UserProfile\\Miniconda3\\Library\\bin;' + $env:PATH",
89+
"& $env:UserProfile\\Miniconda3\\Scripts\\activate.ps1",
90+
"conda config --add channels conda-forge",
91+
"conda config --set channel_priority strict",
92+
"conda install -y -c conda-forge sleef"
9293
]
9394
before-build = "pip install delvewheel"
9495
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel} --add-path %UserProfile%\\Miniconda3\\Library\\bin"

0 commit comments

Comments
 (0)