logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

sre_constants.patch (751B)


  1. SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
  2. SPDX-License-Identifier: PSF-2.0
  3. Again, Python 2.5 added the key= argument for sorting functions,
  4. which is not available when we are building Python 2.5.
  5. Sorting is absolutely unnessecary when generating defines for a
  6. header file so we can just remove it.
  7. --- Python-2.5.6/Lib/sre_constants.py 2004-08-25 12:22:30.000000000 +1000
  8. +++ Python-2.5.6/Lib/sre_constants.py 2022-10-09 20:18:40.332233858 +1100
  9. @@ -219,7 +219,6 @@
  10. if __name__ == "__main__":
  11. def dump(f, d, prefix):
  12. items = d.items()
  13. - items.sort(key=lambda a: a[1])
  14. for k, v in items:
  15. f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
  16. f = open("sre_constants.h", "w")