Skip to content

Commit

Permalink
Activating manylinux/auditwheel compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
chemix-lunacy committed Mar 13, 2024
1 parent 0c6a718 commit c981dbb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
export PATH="/root/.cargo/bin:${PATH}"
export PATH="/root/.local/bin:$PATH"
cd src
pwsh ./build.ps1
pwsh ./build.ps1 -manyLinux
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -99,7 +99,7 @@ jobs:
export PATH="/root/.cargo/bin:${PATH}"
export PATH="/root/.local/bin:$PATH"
cd src
pwsh ./build.ps1
pwsh ./build.ps1 -manyLinux
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -117,7 +117,7 @@ jobs:
name: wheels
path: dist/

- name: Publish distribution 📦 to PyPI using trusted publishing
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
Expand Down
19 changes: 12 additions & 7 deletions src/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ param(
[Parameter(Position = 0, Mandatory = 0)]
[string[]]$taskList = @(),
[Parameter(Position = 1, Mandatory = 0)]
[switch]$docs = $false,
[switch]$manyLinux = $false,
[Parameter(Position = 2, Mandatory = 0)]
[System.Collections.Hashtable]$parameters = @{},
[Parameter(Position = 3, Mandatory = 0)]
[System.Collections.Hashtable]$properties = @{},
[Parameter(Position = 4, Mandatory = $false)]
[switch]$detailedDocs = $false,
[Parameter(Position = 5, Mandatory = $false)]
[switch]$docs = $false,
[Parameter(Position = 3, Mandatory = $false)]
[switch]$buildFromSource = $false
)

if ($buildFromSource -eq $false) {
$env:RSQL_DOWNLOAD_LLVM = $true
} else {
$env:RSQL_DOWNLOAD_LLVM = $false
}

# TODO: Should just be argument, setting as env variable for now for ease of passing.
if ($manyLinux -eq $true) {
$env:RSQL_MANYLINUX = $true
} else {
$env:RSQL_MANYLINUX = $false
}

# PS 7.3 introduced exec alias which breaks the build.
Expand Down
7 changes: 5 additions & 2 deletions src/scripts/psakefile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ task build-rasqal -depends init {
Get-Wheels rasqal | Remove-Item -Verbose
Invoke-LoggedCommand { pip --verbose wheel --no-deps --wheel-dir $Wheels $Rasqal }

if (Test-CommandExists auditwheel) {
if ($env:RSQL_MANYLINUX -eq $true) {
$unauditedWheels = Get-Wheels rasqal
Invoke-LoggedCommand { auditwheel repair --wheel-dir $Wheels $unauditedWheels }
Invoke-LoggedCommand -workingDirectory $Root {
pip install auditwheel
auditwheel repair --wheel-dir $Wheels $unauditedWheels
}
$unauditedWheels | Remove-Item
}

Expand Down

0 comments on commit c981dbb

Please sign in to comment.