licenses / lice

Generate license files for your projects
BSD 3-Clause "New" or "Revised" License
506 stars 38 forks source link

Fix Python 3.12 compat: pkg_resources -> importlib #57

Open tonyseek opened 6 months ago

tonyseek commented 6 months ago
Traceback (most recent call last):
  File ".../bin/lice", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File ".../lib/python3.12/site-packages/lice/__init__.py", line 5, in main
    from lice.core import main
  File ".../lib/python3.12/site-packages/lice/core.py", line 1, in <module>
    from pkg_resources import (resource_stream, resource_listdir)
ModuleNotFoundError: No module named 'pkg_resources'
tonyseek commented 6 months ago

Hi @jcarbaugh,

It seems the lice is broken on Python 3.12 because of incompatible changes. Could you review this patch which may fix it?

-- Jiangge Zhang

seapagan commented 2 months ago

@tonyseek as it seems this project is not getting updated, I have forked and released lice2. It fixes this issue and a couple others while adding new features like a configuration file and a lot of internal updates. I plan to keep maintaining it for the forseeable future and have a few ideas for new features.

Check it out on https://seapagan.github.io/lice2/