alphagov/gds-pre-commit

Extra requirements for environment.

Closed this issue · 1 comments

I use Pyenv to manage my system python and have run into a few issues.

Mostly it needs the system to have all the SQLite3 addons before this will run. Fixed by running the pre-reqs from https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites and doing pyenv install 3.8.2 again.

git commit --amend Traceback (most recent call last): File "/home/work/.pyenv/versions/3.8.2/bin/pre-commit", line 6, in <module> from pre_commit.main import main File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pre_commit/main.py", line 13, in <module> from pre_commit.commands.autoupdate import autoupdate File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pre_commit/commands/autoupdate.py", line 14, in <module> from pre_commit.clientlib import InvalidManifestError File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pre_commit/clientlib.py", line 15, in <module> from pre_commit.error_handler import FatalError File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pre_commit/error_handler.py", line 10, in <module> from pre_commit.store import Store File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pre_commit/store.py", line 4, in <module> import sqlite3 File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/home/work/.pyenv/versions/3.8.2/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ModuleNotFoundError: No module named '_sqlite3'

After rebuilding the environment it requires 'six' to be installed for the installer to work. Easily fixed with pip install six

~/.gds-pre-commit/install.py Traceback (most recent call last): File "/home/work/.gds-pre-commit/install.py", line 9, in <module> from register import register File "/home/work/.gds-pre-commit/register.py", line 7, in <module> import six.moves.urllib as urllib ModuleNotFoundError: No module named 'six'

closing due to the new scope of this project (see readme)