-1

I'm using an Azure DevOps Pipeline to build a Python project (Azure Function). I want to stick with a Windows build agent and use PowerShell to pip install packages. Doing so results in many Python wheels that are appended with win_amd64.whl or platform_system == "Windows".

The target host is Linux so I need the Python wheels to be manylinux_x86_64.whl / platform_system != "Windows".

Is there a flag I can pass pip install to specify which OS to download packages/wheels for?

ericOnline
  • 1,586
  • 1
  • 19
  • 54
  • 1
    https://stackoverflow.com/questions/60604477/how-do-i-pip-install-linux-packages-on-a-windows-machine-for-aws-lambda This seems like the exact copy of your issue. – Jimit Vaghela May 21 '21 at 19:22
  • 1
    https://stackoverflow.com/search?q=%5Bpip%5D+download+windows+linux – phd May 21 '21 at 20:10

1 Answers1

3

This is what I found a proposal from back in 2018.

Given this proposal hasn't been ratified yet and none of us can wait till it does.

Out of curiosity can you use something like Docker hub with WSL2 (Windows Sub System for Linux) as an alternative? To still be able to develop on Windows and still be able to easily download Linux pip wheels like manylinux_x86_64.whl in order to target a Linux host?

Some more research on using Docker to create Windows or Linux images

  • Thanks for the ideas. Since I'm using build tasks in Azure DevOps, I think the easy options are to either set the build agent as Linux or install Azure Function Core Tools and use its built in "magic" to handle things (oryx). – ericOnline May 21 '21 at 21:49