Commit graph

2 commits

Author SHA1 Message Date
adisbladis
3574039b65 hooks: Read setup.py AST as utf-8 with BOM
The AST module throws errors on encountering a BOM.
For a file without a BOM this change makes no difference, but for one with a BOM, the mark character is skipped.
2023-03-28 16:57:30 +13:00
adisbladis
1a79e628b9 Add a hook to rewrite python_requires in setup.py to be PEP440 compliant
Upstream packaging has changed and using wildcards in python_requires is now considered a bug as it's not PEP400 compliant.
Realistically we have to work around this issue as we can't expect every older version to change.

We do this by rewriting the problematic definitions and dropping the
version precision. This works out because 3.9.* is functionally
equivalent to 3.9.
2023-03-23 15:23:57 +13:00