Files
tryton/cookiecutter-module/hooks/post_gen_project.py
T

15 lines
306 B
Python
Raw Normal View History

2023-01-11 19:01:37 +01:00
import os
import shutil
try:
os.symlink('doc/index.rst', 'README.rst')
except (AttributeError, OSError):
shutil.copyfile('doc/index.rst', 'README.rst')
{% if cookiecutter.prefix %}
try:
os.symlink('.', '{{ cookiecutter.package_name }}')
except (AttributeError, OSError):
pass
{% endif %}