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

15 lines
306 B
Python

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 %}