Skip to content

Commit

Permalink
fix: Use .pytemplate for name for cookiecutter
Browse files Browse the repository at this point in the history
This avoids conda install problem.
Fixes projectmesa#1774
  • Loading branch information
rht authored and tpike3 committed Aug 31, 2023
1 parent 79bde5a commit c9be99b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mesa/cookiecutter-mesa/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import glob
import os

file_list = glob.glob('**/*.pytemplate', recursive=True)

for file_path in file_list:
# Check if the file is a regular file
if not os.path.isfile(file_path):
continue
# Rename the file
os.rename(file_path, file_path.replace(".pytemplate", ".py"))

0 comments on commit c9be99b

Please sign in to comment.