I believe only way, now that --build/-b is deprecated, is to change %temp% env-var, just like changing TMPDIR on linux, so with set or setx(if need to be system env-var and not regular env-var of user), though atleast for setx needs reinitialize cmd afterwards, which there's ways to do, but don't really know from top of head currently. Anyway, then just extract the dir under %temp% with a dir command wrapped in a FOR loop, as used in deluge-build scripts to get name of deluge-dir etc. Sorry cannot really test directly, as not have my windows VMs anymore, as said in other thread.
However, I don't understand why you even need this, since you say it works fine now, and then later pip will change to build in-place and not be copied into %temp%, but maybe i'm misunderstanding something. Have you tested the new functionality about if there's issues, with --use-feature=in-tree-build. I mean, if you don't need the temp dir now, then why later when it's not copied into %temp% anymore?
Last, honestly I don't understand why you want to avoid gnu patch of msys2 for git apply. To me they are interchangeble i.e. both use same amount of command-lines and time to run(and I just initially defined file to patch when only single file modified in a patch, though stopped doing this later on, as redundant), but anyway that is besides the point and what's important of-course is what you prefer yourself
Anyway, if cloning the git repo like you do, then might as well as you said, omit the msys2 additional patch dep, and instead use git apply directly, so for that I can of-course see the advantage for that. Anyway just wanted to explain gnu patch isn't inferior, slower or less easy imho, but again your choise entirely of-course and should use what you deem best obviously.
Good job regarding your edits to first post!
Edit(s): Okay after rereading your post again, then I was too dense to understand before, sorry
I now understand that you're asking how use git-apply through my method, as you wan't that for when pip changes functionality, though as I understand it, you should still be able to use your method, as only change is that no intermittent copy to %temp% happening and so instead build happens direct in clone dir/in-place, so no reason to change imho.
However, if needed regardless then as per your specific question about getting pip's tmp-dir name/path, then something along:
Code: Select all
set temp=%cd%
python\scripts\pip install git+....
for /f %%i in ('dir /b pip-req-build-*') do set pipdir=%%i
Hmm, come to think of it, then don't even need change %temp% unless actually preferring it, and e.g. just do instead to get that tmp dir from pip:
Code: Select all
for /f %%i in ('dir /b /ad /od %temp%\pip-req-build-*') do set pipdir=%%i
Though if using my method, then clones and builds at once, so you have no time to run git-apply in between, but as said all this shouldn't even be needed and just continue with your way simply. With my method, you could use pip's download instead of install(git supported there also), then git-apply and then pip install, but same scenario as before. Could also just clone dir, git apply and use python setup.py build and python setup.py install.
About your ipv6 patch giving error, then I guess it's because you use my modded patch which I apply only to the dev build(wanted to keep the stable build as stable/vanilla as possible), as I just tested and when used like you do then fails in one of the files to patch i.e. when used from local git-repo and not as I do afterwards a pip install run, where no fail. In my scripts I downloaded that patch file instead of using curl directly, because changed one of the referenced files as name changes when installed vs in a git clone dir as you do(and as original patch), plus another change making the geoip files be used from current dir always, when the defined path not found(linux path by default). If you apply the patch with curl i.e. apply unmodified, then no errors I just checked. However, the only thing currently missing with the single fail and my modded patch, is that there's no ipv6 geoip file to select path to in webui preferences, but as said I already hardcoded fallback to current dir regardless, where I have them placed in, so irrelevant. If wanting keep my patch, and wanna fix that error when used from git-clone dir, then I just fixed it up for ya just in case:
https://paste.c-net.org/GunshotsImage I only tested it on clean master(stable 2.0.3) on my linux system however. BTW, Strangelovian's in/out patch/PR bypasses is_ip() so the doadin is_ip() patch is irrelevant imho, unless I'm misunderstanding something. Strangelovian stated he would add back is_ip() support to work together with doadin's patch, but never did, probably because doadin stated best to wait and see what Cas thought firstly. Doesn't hurt neither of-course to include.