Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template locations in site-packages #79

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

a-gardner1
Copy link

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