-
Notifications
You must be signed in to change notification settings - Fork 66
Description
If two templates are installed in an environment at the same time (e.g. this one and cookiecutter-pdm), this causes an issue, since both try to add hooks, {{cookiecutter.project_name}} and cookiecutter.json in the site-packages directory.
This means that only one template is actually installed, and both the commands ccp and ccpdm will trigger the same template. e.g. when installing both packages:
pip install cookiecutter-poetry
pip install cookiecutter-pdmand then running
ccp
ccpdmboth commands wil create a poetry project!
Solutions
Option 1
A possible solution would be to move the template to a subdirectory:
However, this would mean that the template, if installed from the URL, would need to be installed as follows:
cookiecutter https://github.com/fpgmaas/cookiecutter-poetry.git \
--directory templates/cookiecutter-poetrywhich is less clean and less intuitive. This also breaks the existing functionality.
Option 2
Remove the possibility to install the package, and remove the publishing to pypi. I don't really like this option, because currently it is easy for someone to pin the specific version of the template they want to use by simply installing that version of the template.
Option 3
Find another way to bundle the template with the Python package?