Skip to content

Fix template locations in site-packages - #79

Open
a-gardner1 wants to merge 6 commits into
johann-petrak:masterfrom
a-gardner1:master
Open

Fix template locations in site-packages#79
a-gardner1 wants to merge 6 commits into
johann-petrak:masterfrom
a-gardner1:master

Conversation

@a-gardner1

Copy link
Copy Markdown

As indicated in multiple open issues (#66, #74, #36), the package can have trouble locating the template files when globally installed in an environment. This can prevent one from using the package as a pre-commit hook.

This PR resolves the issue by restructuring licenseheaders as an actual package and shifting the templates into its directory structure, which is then recursively included in the manifest. As part of testing the solution, I also updated the tests to use the unittest framework and fixed a minor bug in the Python template settings. Finally, in attempting to apply it to my own codebase, I made a slight change to the file reading that allowed it to progress in the event of a UnicodeDecodeError.

I also shifted the setup logic to a more modern pyproject.toml format, but I did not update the version.

@a-gardner1
a-gardner1 marked this pull request as ready for review October 9, 2023 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant