In Python 3.10 and 3.11, distutils has been formally marked as deprecated.
Code that imports distutils will no longer work from Python 3.12.
I'm pretty sure distutils.dir_util.remove_tree() and shutil.rmtree() do
the same exact same thing and this should fix the issue :)
I do not fully understand how the building process works, and have some doubts
on what a "source distribution" should be.
The sdist might be polluted if a "man" directory exists at the project root
when building the distribution.
The inclusion of man pages in the wheel requires it to be built from the sdist,
so it's best to build both at the same time using "python -m build".
Closes#215
Metadata in `setup.cfg` rather than `pyproject.toml` as I'm a bit confused
about `setuptools` support for PEP-621.
Test stuff still in `setup.py`, this needs updating and I'm not satisfied with
the way they are loaded/discovered.
- Fixes zip downloads failing when zipping enough data that Zip64
extensions are required by automatically enabling them if needed.
- Fixes zip downloads failing when a file has a datestamp that zipfiles
cannot store (pre-1980 or post-2108) by clamping them within the
supported range.
- Massively speeds up zip downloads by disabling compression (audio
files generally don't compress well anyway)
- Computes the total size of a generated zip file before streaming it
and sets the `Content-Length` header. This allows clients to show a
final size and progress bar while downloading, as well as detect if
the download fails.
- Adds a check to prevent sending an empty zip file to the client if
there was no content to download (will error out instead).
- `os.scandir` (provided by a 3rd party package in 2.7)
- `os.replace` (doesn't exist in 2.7 - have to use `os.rename` instead)
- `os.utime` (the times param is required in 2.7)