update to 2.4.0 (rhbz#2088759)
Replace manual BuildRequires with automatic python build-dependency
generator. This also requires replacing %py3_build/%py3_install with
the more modern %pyproject_wheel/%pyproject_install macros.
Make use of %pyproject_save_files and %pyproject_files in the process,
to ensure we keep up with any future changes in the python deployment
process.
Note that %pyproject_save_files includes `%license COPYING` so we don't
need to list it separately.
Make test dependencies conditional on `--with tests` (which is the
default).
While here, re-order the BuildRequires and Requires sections.