diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 39cffbd924..4af9d6402b 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -459,6 +459,20 @@ elif target == 'linux' and (os.path.isfile("/lib/libc-2.5.so") or os.path.isfile else: PLATFORM = 'manylinux1-i686' +elif target == 'linux' and (os.path.isfile("/lib/libc-2.12.so") or os.path.isfile("/lib64/libc-2.12.so")) and os.path.isdir("/opt/python"): + # Same sloppy check for manylinux2010. + if GetTargetArch() in ('x86_64', 'amd64'): + PLATFORM = 'manylinux2010-x86_64' + else: + PLATFORM = 'manylinux2010-i686' + +elif target == 'linux' and (os.path.isfile("/lib/libc-2.17.so") or os.path.isfile("/lib64/libc-2.17.so")) and os.path.isdir("/opt/python"): + # Same sloppy check for manylinux2014. + if GetTargetArch() in ('x86_64', 'amd64'): + PLATFORM = 'manylinux2014-x86_64' + else: + PLATFORM = 'manylinux2014-i686' + elif not CrossCompiling(): if HasTargetArch(): # Replace the architecture in the platform string. diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index 1ba176116c..f4fce36de4 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -92,7 +92,7 @@ EXCLUDE_EXT = [".pyc", ".pyo", ".N", ".prebuilt", ".xcf", ".plist", ".vcproj", " # Plug-ins to install. PLUGIN_LIBS = ["pandagl", "pandagles", "pandagles2", "pandadx9", "p3tinydisplay", "p3ptloader", "p3assimp", "p3ffmpeg", "p3openal_audio", "p3fmod_audio"] -# Libraries included in manylinux ABI that should be ignored. See PEP 513/571. +# Libraries included in manylinux ABI that should be ignored. See PEP 513/571/599. MANYLINUX_LIBS = [ "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libcrypt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", @@ -530,10 +530,14 @@ def makewheel(version, output_dir, platform=None): else: print("Could not find platform.dat in build directory") platform = get_platform() - if platform.startswith("linux-"): - # Is this manylinux1? - if os.path.isfile("/lib/libc-2.5.so") and os.path.isdir("/opt/python"): + if platform.startswith("linux-") and os.path.isdir("/opt/python"): + # Is this manylinux? + if os.path.isfile("/lib/libc-2.5.so") or os.path.isfile("/lib64/libc-2.5.so"): platform = platform.replace("linux", "manylinux1") + elif os.path.isfile("/lib/libc-2.12.so") or os.path.isfile("/lib64/libc-2.12.so"): + platform = platform.replace("linux", "manylinux2010") + elif os.path.isfile("/lib/libc-2.17.so") or os.path.isfile("/lib64/libc-2.17.so"): + platform = platform.replace("linux", "manylinux2014") platform = platform.replace('-', '_').replace('.', '_')