debugpy/win/build_all.ps1
Karthik Nadig 4877164466
Fixes issue with building windows wheels (#1098)
* Try building ABI specific wheels

* Fix typo

* Fix another typo

* Skip cython rebuild

* Try some tweaks

* Revert "Skip cython rebuild"

This reverts commit 3ba6002e9cc1715d9202ec778adc52e6dc7b1732.

* More tweaks

* Fix pathlib install

* Disable 2.7 builds

* Try pure python builds

* Tweak and test pure builds

* Tweak pure builds

* Add universal wheel

* Try universal wheel

* Attempt to fix pyds

* Try re adding platform

* Keep install structure between builds

* Split how we build wheels for windows

* Fix broken sys argv

* Fix setup platform

* Adding some logging for filter

* Fix platform build script

* Ensure ABI tag

* Fix platform abi

* Test platform build of wheels

* fix platform metadata

* Log pyd file generation

* Log dir location for pyd

* recursively include *win*.pyd

* limit to pydevd pyds

* tweak manifest

* remove unused code

* restore manifest changes

* fix proj path

* Remove logging

* Add script for linux wheels (#3)

* Add linux builds

* Simplify building bdist and sdist wheels.

* Try with frame eval off

* Ensure imports

* Add instructions to build linux wheels locally.
2019-01-18 10:26:55 -08:00

42 lines
1.4 KiB
PowerShell

param($packages, [switch]$pack, [string]$wheeltype)
$root = $script:MyInvocation.MyCommand.Path | Split-Path -parent;
if ($env:BUILD_BINARIESDIRECTORY) {
$bin = mkdir -Force $env:BUILD_BINARIESDIRECTORY\bin
$obj = mkdir -Force $env:BUILD_BINARIESDIRECTORY\obj
$dist = mkdir -Force $env:BUILD_BINARIESDIRECTORY\dist
} else {
$bin = mkdir -Force $root\bin
$obj = mkdir -Force $root\obj
$dist = mkdir -Force $root\dist
}
$env:SKIP_CYTHON_BUILD = "1"
Get-ChildItem $dist\*.whl, $dist\*.zip | Remove-Item -Force
(Get-ChildItem $packages\python* -Directory -Filter '*python.3.7*') | ForEach-Object{ Get-Item $_\tools\python.exe } | Where-Object{ Test-Path $_ } | Select-Object -last 1 | ForEach-Object{
Write-Host "Building with $_"
& $_ -m pip install -U pip
& $_ -m pip install -U pyfindvs setuptools wheel cython
if ($wheeltype -eq 'sdist') {
Write-Host "Building sdist with $_"
& $_ setup.py sdist -d "$dist" --formats zip
}
if ($wheeltype -eq 'pure') {
Write-Host "Building wheel with $_ pure python wheel"
& $_ setup.py bdist_wheel -d "$dist" --pure
}
if ($wheeltype -eq 'universal') {
Write-Host "Building wheel with $_ universal wheel"
& $_ setup.py bdist_wheel -d "$dist" --universal
}
Get-ChildItem $dist\ptvsd-*.whl, $dist\*.zip | ForEach-Object{
Write-Host "Built wheel found at $_"
}
}