I ran into an issue where ssm-parameter-store was failing to run in a Python 3.12 venv because setuptools wasn't installed:
2024-09-27T14:31:10 File "/app/config/settings/base.py", line 24, in <module>
2024-09-27T14:31:10 from ssm_parameter_store import EC2ParameterStore
2024-09-27T14:31:10 File "/usr/local/lib/python3.12/site-packages/ssm_parameter_store/__init__.py", line 2, in <module>
2024-09-27T14:31:10 from .version import __version__
2024-09-27T14:31:10 File "/usr/local/lib/python3.12/site-packages/ssm_parameter_store/version.py", line 1, in <module>
2024-09-27T14:31:10 from pkg_resources import get_distribution, DistributionNotFound
2024-09-27T14:31:10 ModuleNotFoundError: No module named 'pkg_resources'
Since Python 3.8 the preferred way to get the package's installed version is from importlib.metadata import version, which doesn't require extra packages to be installed.
I can make a PR to update to support Python 3.8+ if you are interested in that. (3.8 goes EOL in about a month at the time of writing so at this point it seems pretty safe to rely on it.)
I ran into an issue where
ssm-parameter-storewas failing to run in a Python 3.12 venv because setuptools wasn't installed:Since Python 3.8 the preferred way to get the package's installed version is
from importlib.metadata import version, which doesn't require extra packages to be installed.I can make a PR to update to support Python 3.8+ if you are interested in that. (3.8 goes EOL in about a month at the time of writing so at this point it seems pretty safe to rely on it.)