Skip to content

Commit

Permalink
More tweaks for the build
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 5, 2023
1 parent 5a7caaa commit 5d55852
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ jobs:
run: |
python -m pip install cibuildwheel
- name: Set VSDev RC (windows only)
if: ${{ matrix.buildplat[1] }} == 'win'
run: |
function Invoke-VSDevEnvironment {
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
$Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
& "${env:COMSPEC}" /s /c "`"$Command`" -arch=amd64 -no_logo && set" | Foreach-Object {
if ($_ -match '^([^=]+)=(.*)') {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}
}
Invoke-VSDevEnvironment
Get-Command rc.exe | Format-Table -AutoSize
- name: Build wheels
uses: pypa/[email protected]
env:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ setup = ['--default-library=static']
[tool.cibuildwheel]
test-requires = ["pytest", "pytest-cov", "pytest-benchmark"] # coverage-badge
test-command = ["coverage run --source={package} -m pytest {package}/tests", "coverage report -m"]
build-verbosity = 2
build-verbosity = 1
skip = "cp36-* cp37-* pp* *_ppc64le *_i686 *_s390x"

[tool.cibuildwheel.macos]
Expand All @@ -47,4 +47,5 @@ environment = { PKG_CONFIG_PATH="C:/opt/64/lib/pkgconfig", CXX="g++", CC="gcc" }
repair-wheel-command = "bash ./tools/wheels/repair_windows.sh {wheel} {dest_dir}"

[tool.cibuildwheel.linux]
environment = { CC="clang", CXX="clang++" }
before-build = "bash {project}/tools/cibw_linux.sh"
environment = { CC="clang", CXX="clang" }
24 changes: 12 additions & 12 deletions tools/cibw_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# https://github.com/actions/virtual-environments/issues/294#issuecomment-588090582
# with additional -arch=x86 flag to vsdevcmd.bat
# https://github.com/actions/runner-images/issues/294
function Invoke-VSDevEnvironment {
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
$Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
& "${env:COMSPEC}" /s /c "`"$Command`" -arch=amd64 -no_logo && set" | Foreach-Object {
if ($_ -match '^([^=]+)=(.*)') {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}
}
Invoke-VSDevEnvironment
Get-Command rc.exe | Format-Table -AutoSize
# function Invoke-VSDevEnvironment {
# $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
# $installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
# $Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
# & "${env:COMSPEC}" /s /c "`"$Command`" -arch=amd64 -no_logo && set" | Foreach-Object {
# if ($_ -match '^([^=]+)=(.*)') {
# [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
# }
# }
# }
# Invoke-VSDevEnvironment
# Get-Command rc.exe | Format-Table -AutoSize

choco install rtools -y --no-progress --force --version=4.0.0.20220206"
set PATH=C:\rtools40\ucrt64\bin\;%PATH%

0 comments on commit 5d55852

Please sign in to comment.