There's no simple way. Ultimately, `make_archive` calls `shutil._make_tarball`, and that function hard-codes the archive name as `archive_name = base_name + '.tar' + compress_ext`. You would essentially need to reimplement `_make_tarball` to use `base_name + '.tgz'` instead, then patch `shutil._ARCHIVE_FORMATS` to use your new implementation of `_make_tarball`.
– chepnerJun 23 '23 at 16:23
See also [here](https://stackoverflow.com/a/73121102/20851944) what kind of formats are available in shututil.
– Hermann12Jun 23 '23 at 16:42
@chepner On windows I can do only `shutil.make_archive()` (with format zip), on posix I must do `shutil.make_archive()` plus `os.replace()`.
– erikJun 26 '23 at 13:01