[14:37:06] <gsnedders> related to my question in #pypa yesterday: how does pip end up installing in a virtualenv when called as venv/bin/pip? I feel like I'm missing something obvious there. Like, where does it get the path to the venv/lib and decide to install there?
[15:08:18] <pradyunsg> gsnedders: It's invoked using the interpreter in the virtualenv, which results in it using that environment. You can look at the shebang on non windows systems to verify.
[15:12:48] <gsnedders> pradyunsg: but where does it install to? site.getsitepackages doesn't appear to exist within the venv? sys.prefix instead or what?
[19:08:36] <pradyunsg> dstufft: would you be coming to PyCon North America?
[19:13:35] <pradyunsg> gsnedders: i don't remember off the top of my head. It's definitely within the virtual env in site-pacakges. It likely comes from "sysconfig" in the stdlib.
[19:16:23] <dstufft> pradyunsg: unless something goes wrong between nowo and then, yes
[19:17:09] <pradyunsg> dstufft: great! my situation is fairly similar.
[21:07:00] <gsnedders> so maybe I should just restate what I asked in #pypa rather than asking the questions trying to dig through pip's source led to; I'm trying to check whether pip install [x] in a venv is a no-op or not (where there's no upgrading being done), given calling `pip install` is relatively slow. My first attempt at using pkg_resources.require for this basically ran into having the wrong WorkingSet (because
[21:07:06] <gsnedders> it also included the global site-packages and found an incompatible version of one package there), but I don't know if I'll get the right behaviour if I just create a new WorkingSet containing only the venv?
[23:01:49] <dstufft> gsnedders: uhh, I think there is probably not a great way o doing that currently. MAybe WorkingSet will do the right thing? I don't really know
[23:23:32] <gsnedders> dstufft: guess I'll try and figure out what exactly the WorkingSet should be, pretty sure somewhere eventually it's what pip does from my code reading…
[23:23:43] <gsnedders> dstufft: also do you need a new html5lib release? I should probably make one at some point…
[23:33:41] <dstufft> gsnedders: hmm, I don't think we have any open bugs or anything with pip's html parsing.Luckily our parsing needs are pretty simple
[23:34:06] <gsnedders> dstufft: I thought there was something about Py3.8 throwing warnings or something, I can't remember.
[23:34:20] <dstufft> you are right I think actually
[23:35:56] <gsnedders> I should probably get around to this. And probably find someone to actually maintain it. Or just mentor people enough that my not doing work doesn't imply nobody does work.
[23:36:05] <gsnedders> (or go back to finding someone to pay me :))