Hi Paul,
Initial build:
http://smedley.id.au/tmp/python-3.8.3-os2-20200711.zip
Currently expects to be installed in /python38 - it should be possible to move it provided PYTHONPATH & PYTHONHOME are set appropriately...
Alright, so I set this up in a separate code\tools directory on my machine (to prevent any conflict with the RPM 2.7 stuff), here is what my environment config cmd file looks like:
@ECHO OFF
mode 80,60
SET MAIN=G:\code\tools\python38
rem *************************************************
rem Python 3.8 for OS/2 environment variable settings
rem *************************************************
REM change PATH below unless using default YUM/RPM install in \usr\bin
SET PATH=%MAIN%\bin;%PATH%
REM change LIBPATH to pull in the python3.8 specific DLLs
SET BEGINLIBPATH=%MAIN%\bin;
SET PYTHONHOME=%MAIN%
SET PYTHONPATH=%MAIN%\Lib\python3.8;%MAIN%\Lib\python3.8\plat-os2knix;%MAIN%\Lib\python3.8\lib-dynload;%MAIN%\Lib\python3.8\site-packages
if $%1$==$$ goto end
start python3 %1 %2 %3 %4 %5 %6 %7 %8 %9
exit
:end
So a couple of issues to report:
1) speedtest execution
Attempting to execute the speedtest script I get the following error msg:
File "G:\code\tools\python38\Lib\python3.8/site.py", line 178
file=sys.stderr)
^
SyntaxError: invalid syntax
So it feels like maybe the unix vs os2 path separator is getting in the way? I took a stab at this just by converting my python environment setup cmd to use '/' instead of '\', but that made no difference.
Since the cmd driven approach did not seem to work I took to just executing the speedtest dirctly by passing the script and the input params into python3.exe:
[G:\util\misc]\code\tools\python38\bin\python3 speedtest-cli --server 20916
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
: unable to get local issuer certificate (_ssl.c:1108)>
In this case it would appear I hit some sort of certificate issue.
Any ideas Paul? I did not try anything else since this speed test is a pretty good excercise and if I could get it working with 3.8 that would be a pretty good test.
2) python3 invocation from CLI
The python3 environment seems to start up, but I absolutely can not type anything into the window itself. Can't even CTRL-C out of it, the only way is to kill it:
[G:\code\tools\python38\bin]python3
Python 3.8.3 (default, Jul 11 2020, 10:35:02)
[GCC 9.2.0] on os2knix
Type "help", "copyright", "credits" or "license" for more information.
>>>
Not sure what to make of that one.
Thanks,
-Dariusz