We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4167081 commit 123c991Copy full SHA for 123c991
hooks/post_gen_project.py
@@ -1,6 +1,7 @@
1
import os
2
import sys
3
4
+repo_name = '{{cookiecutter.repo_name }}'
5
6
def set_python_version():
7
python_version = str(sys.version_info.major) + "." + str(sys.version_info.minor)
@@ -15,7 +16,7 @@ def set_python_version():
15
16
17
def remove_main_if_lib():
18
is_lib = '{{ cookiecutter.binary }}'
- main_file_path = os.path.join('{{ cookiecutter.repo_name }}', '__main__.py')
19
+ main_file_path = os.path.join(repo_name, '__main__.py')
20
if not (is_lib == "y" or is_lib == "Y"):
21
os.remove(main_file_path)
22
0 commit comments