FindPython: enhance robustness of version extraction from library name

Fixes: #21105
38 jobs for !5135 with bug-fixes in 56 minutes and 17 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Build
passed #5140552
linux docker build cmake manual
build:centos6-release

00:03:04

passed #5140549
linux docker build cmake
build:debian10-iwyu

00:10:31

passed #5140553
linux-3.17 linux docker build cmake manual
build:fedora31-ninja

00:02:06

passed #5140551
linux-3.17 linux docker build cmake
build:fedora31-sphinx

00:04:51

passed #5140550
linux-3.17 linux docker build cmake
build:fedora31-tidy

00:04:13

passed #5140555
nonconcurrent xcode-11.5 shell macos cmake manual
build:macos-makefiles

00:02:49

passed #5140554
nonconcurrent xcode-11.5 shell macos cmake manual
build:macos-ninja

00:02:40

passed #5140556
nonconcurrent msvc-19.25 vs2019 shell windows cmake manual
build:windows-vs2019-x64-ninja

00:06:48

 
  Test
passed #5140557
linux-3.17 linux docker build cmake
test:fedora31-ninja

00:04:17

passed #5140559
nonconcurrent xcode-11.5 shell macos cmake
test:macos-makefiles

00:11:05

passed #5140558
nonconcurrent xcode-11.5 shell macos cmake
test:macos-ninja

00:08:28

passed #5140560
nonconcurrent msvc-19.25 vs2019 shell windows cmake
test:windows-vs2019-x64-ninja

00:14:26

 
  Test Ext
passed #5140562
linux docker cuda-rt cmake
test:cuda10.2-nvidia

00:00:52

passed #5140561
linux-3.17 linux docker build cmake
test:fedora31-makefiles

00:02:35

passed #5140563
linux-3.17 linux docker build cmake
test:fedora31-ninja-multi

00:12:38

passed #5140564
concurrent xcode-11.5 shell macos cmake
test:macos-xcode

00:28:18

passed #5140565
concurrent msvc-19.25 vs2019 shell windows cmake
test:windows-vs2019-x64

00:24:26

 
  External
passed cdash

passed ghostflow-check-master

passed ghostflow-check-release

passed ghostflow-stager

passed cdash

passed cdash

passed cdash

passed cdash

passed cdash

passed cdash

passed cdash

passed cdash

passed ghostflow-check-master

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager