Virtual environment support
Closed this issue · 0 comments
cmccarthy1 commented
- The addition of support for virtual environments as released in
1.3.3
(now revoked) added a bug raised in issue #86 - The code which had been added to
py.c
andp.q
is as follows
py.c
EXP K3(init){ZI i=0,tr=1;I f,g;S l,h;K n,v;P a,b,pyhome;P(i,0)l=zs(x),h=zs(y);f=pyl(l);free(l);
P(!f,krr("libpython"))((tr==z->i)?Py_SetPythonHome:Py_SetProgramName)(Py_DecodeLocale(h,0))
p.q
c:"-c \"",pr[$[.z.o like"w*";sc["/python";`BINDIR`VERSION],"+'.dll'";sc["/";`LIBDIR`INSTSONAME]]],pr[$[.z.o like"m*";sc["/";`PYTHONFRAMEWORKPREFIX`INSTSONAME];.z.o like"l*";sc["/libpython";`LIBDIR`LDVERSION],"+'.so'";"''"]],pr["__import__('sys').prefix"],pr["__import__('sys').base_prefix"],"\"2>",$[.z.o like"w*";"nul <nul";"/dev/null"];
`L`M`H`B set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]];C:H~B;
.p:(`:./p 2:(`init;3))[L;H;C]]
Appears to be an issue with with the collection of PyDecodeLocale(h,0)
when associated with Py_SetPythonHome
/Py_SetProgramName
under certain circumstances the origin of which is still unknown.
Prior testing indicated full operational behaviour in pyenv/venv/conda however given a number of users have raised an issue internally and on github (namely #85) this indicate that all cases aren't covered. Hence revoke of release 1.3.3 and upload of release 1.3.4 which reverts behaviour and updates CI tests for newer versions of python libraries and pip.
Will attempt to replicate locally and fix as appropriate