<div>Have you already tried `pip download --platform`?</div><div><br></div><div><a href="https://pip.pypa.io/en/stable/reference/pip_download/#cmdoption-platform">https://pip.pypa.io/en/stable/reference/pip_download/#cmdoption-platform</a></div><div><br></div><div><br></div><div>It may be worth setting up devpi (maybe in a container) and caching the packages; particularly for CI:</div><div><br></div><div><a href="https://packaging.python.org/guides/index-mirrors-and-caches/">https://packaging.python.org/guides/index-mirrors-and-caches/</a></div><div><br></div><div>AFAIU, there's no way to specify a limited set of packages and platforms to mirror with bandersnatch?</div><br>On Wednesday, April 4, 2018, Eric Gorr <<a href="mailto:ericgorr@gmail.com">ericgorr@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">I had a question about distributing python packages to offline machines when the offline machine is running a different OS then a machine with an internet connection. The packages I am concerned with are third party upon which mine depend.</span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">Based on what I have learned so far, there are three solutions. </span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">(a) Use a CI to run a fleet of machines for each OS one needs to target to obtain the OS specific wheels.</span><br></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">(b) 'pip download <package_list> --no-binary :all:' -- the intention here is to grab the source distribution without any OS specific code included.</span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:14.666666984558105px">(c) use </span><span style="font-size:14.666666984558105px"><a href="https://warehouse.pypa.io/api-reference/json" target="_blank">https://warehouse.pypa.io/<wbr>api-reference/json</a> to look for distributed wheels for the target OS and python version and download them directly. (This may make for a nice flag to add to pip somewhere...the ability to specify what wheel one wants when it isn’t for the machine pip is running on)</span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">The issue I see with (a) is the shear amount work it would take to setup and maintain such a system. </span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">The issue I see with (b) is that it is not 100% reliable as some packages are tricky to install and may not work well with 'pip download’.    </span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">I have not played around with (c) yet, so I do not know how well it will work, but it seems like a viable solution.</span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">I was just wondering if anyone had any comments on this as I think though the ways to solve this problem.</span></p><p class="MsoNormal" style="color:rgb(49,49,49);word-spacing:1px"><span style="font-size:0.9166666865348816rem">Thank you.           </span><br></p>
</blockquote>