This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients BTaskaya, Michael.Felt, vstinner
Date 2020-03-11.21:30:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583962243.19.0.000874134283373.issue39936@roundup.psfhosted.org>
In-reply-to
Content
OK. I removed the _aix_support.py from the formula.

After make see the new (rather) old build paths for "socket"

aixtools@x064:[/home/aixtools/python-3.9]find . | grep socket
./Doc/howto/sockets.rst
./Doc/library/socket.rst
./Doc/library/socketserver.rst
./Lib/__pycache__/socket.cpython-39.opt-1.pyc
./Lib/__pycache__/socket.cpython-39.opt-2.pyc
./Lib/__pycache__/socket.cpython-39.opt-4.pyc
./Lib/__pycache__/socket.cpython-39.pyc
./Lib/__pycache__/socketserver.cpython-39.pyc
./Lib/socket.py
./Lib/socketserver.py
./Lib/test/__pycache__/mock_socket.cpython-39.pyc
./Lib/test/__pycache__/test_socket.cpython-39.pyc
./Lib/test/__pycache__/test_socketserver.cpython-39.pyc
./Lib/test/mock_socket.py
./Lib/test/test_socket.py
./Lib/test/test_socketserver.py
./Modules/socketmodule.c
./Modules/socketmodule.h
./PCbuild/_socket.vcxproj
./PCbuild/_socket.vcxproj.filters
./build/lib.aix-7.1-3.9/_socket.so
./build/temp.aix-7.1-3.9/home/aixtools/python-3.9/Modules/socketmodule.o

I remove these two files again and run make:

aixtools@x064:[/home/aixtools/python-3.9]make
 CC='xlc_r' LDSHARED='Modules/ld_so_aix xlc_r -bI:Modules/python.exp    ' OPT='-DNDEBUG -O'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''  ./python -E ./setup.py  build
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building '_asyncio' extension
xlc_r -DNDEBUG -O -I./Include/internal -I./Include -I. -I/home/aixtools/python-3.9/Include -I/home/aixtools/python-3.9 -c /home/aixtools/python-3.9/Modules/_asynciomodule.c -o build/temp.aix-7.1-3.9/home/aixtools/python-3.9/Modules/_asynciomodule.o
Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-7.1-3.9/home/aixtools/python-3.9/Modules/_asynciomodule.o -o build/lib.aix-7.1-3.9/_asyncio.so
building '_socket' extension
xlc_r -DNDEBUG -O -I./Include/internal -I./Include -I. -I/home/aixtools/python-3.9/Include -I/home/aixtools/python-3.9 -c /home/aixtools/python-3.9/Modules/socketmodule.c -o build/temp.aix-7.1-3.9/home/aixtools/python-3.9/Modules/socketmodule.o
    1500-030: (I) INFORMATION: PyInit__socket: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-7.1-3.9/home/aixtools/python-3.9/Modules/socketmodule.o -o build/lib.aix-7.1-3.9/_socket.so
*** WARNING: renaming "_asyncio" since importing it failed: No module named '_socket'

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm                 _lzma                 _sqlite3
_tkinter              readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd
time


Following modules built successfully but were removed because they could not be imported:
_asyncio

The diff!

diff --git a/Lib/_aix_support.py b/Lib/_aix_support.py
index 2c5cd3297d..c7f4491633 100644
--- a/Lib/_aix_support.py
+++ b/Lib/_aix_support.py
@@ -12,7 +12,8 @@ try:
     _tmp_bd = get_config_var("AIX_BUILDDATE")
     _bgt = get_config_var("BUILD_GNU_TYPE")
 except ImportError:  # pragma: no cover
-    _have_subprocess = False
+    import _bootsubprocess as subprocess
+    _have_subprocess = True
     _tmp_bd = None
     _bgt = "powerpc-ibm-aix6.1.7.0"

diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 4b002ecef1..513af52ecd 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -79,8 +79,9 @@ def get_host_platform():
             machine += ".%s" % bitness[sys.maxsize]
         # fall through to standard osname-release-machine representation
     elif osname[:3] == "aix":
-        from _aix_support import aix_platform
-        return aix_platform()
+        return "%s-%s.%s" % (osname, version, release)
+        # from _aix_support import aix_platform
+        # return aix_platform()
     elif osname[:6] == "cygwin":
         osname = "cygwin"
         rel_re = re.compile (r'[\d.]+', re.ASCII)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 4003726dc9..b116e96007 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -666,8 +666,9 @@ def get_platform():
             machine += ".%s" % bitness[sys.maxsize]
         # fall through to standard osname-release-machine representation
     elif osname[:3] == "aix":
-        from _aix_support import aix_platform
-        return aix_platform()
+        return "%s-%s.%s" % (osname, version, release)
+        # from _aix_support import aix_platform
+        # return aix_platform()
     elif osname[:6] == "cygwin":
         osname = "cygwin"
         import re

IMHO - this problem has nothing to do with _aix_support.py - That issue was fixed earlier by the new _bootsubprocess.
History
Date User Action Args
2020-03-11 21:30:43Michael.Feltsetrecipients: + Michael.Felt, vstinner, BTaskaya
2020-03-11 21:30:43Michael.Feltsetmessageid: <1583962243.19.0.000874134283373.issue39936@roundup.psfhosted.org>
2020-03-11 21:30:43Michael.Feltlinkissue39936 messages
2020-03-11 21:30:42Michael.Feltcreate