[1.4.x] Fixed #19252 -- Added support for wheel packages.

Backport from master (a5becad9094e5c5403b692b9a7b3a6ffaabf64a3).