Skip to content

Commit

Permalink
Allow to load on windows on 3.10 (#116)
Browse files Browse the repository at this point in the history
* Allow to load on windows on 3.10

* Simplify version check
  • Loading branch information
rianoc committed Oct 21, 2022
1 parent 0e7358d commit 06d3039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p.q
Expand Up @@ -8,7 +8,7 @@ if[(o="w")&count getenv[`UNDER_PYTHON];'"embedPy running within a Python process
if[not .P.loaded:-1h=type@[`.p@;`numpy;`];
sc:{"'",x,"'.join([__import__('sysconfig').get_config_var(v)for v in",ssr[.j.j y;"\"";"'"],"])"};pr:{"print(",x,");"};
c:"-c \"",pr["'.'.join([str(getattr(__import__('sys').version_info,x))for x in ['major','minor']])"],"\"2>",$[o="w";"nul <nul";"/dev/null"];
if[(o="w")and `3.6>`$first@[system"python3 ",;c;{system"python ",c}];'"embedPy requires python 3.6 or higher on windows"];
if[(o="w")and any 3 6>"J"$"." vs first@[system"python3 ",;c;{system"python ",c}];'"embedPy requires python 3.6 or higher on windows"];
c:"-c \"",pr[$[o="w";sc["/python";`BINDIR`VERSION];sc["/libpython";`LIBDIR`LDVERSION]],"+'",$[o="w";".dll";o="l";".so";".dylib"],"'"],pr["__import__('sys').base_prefix"],pr["__import__('sys').prefix"],pr["__import__('sys').executable"],"\"2>",$[o="w";"nul <nul";"/dev/null"];
`L`H`P`B set'@[system"python3 ",;c;{system"python ",c}];
.P.env:not H~P;
Expand Down

0 comments on commit 06d3039

Please sign in to comment.