From 679fc62256ffb87b6101840563fc2952d7166e1b Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 16 Nov 2018 15:24:19 +0100 Subject: [PATCH] cookiecutter: fix tests for python2 --- tools/templates/{{ cookiecutter.project_name }}-ios/main.m | 2 +- .../{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/templates/{{ cookiecutter.project_name }}-ios/main.m b/tools/templates/{{ cookiecutter.project_name }}-ios/main.m index 10ba0d3..f237b7b 100644 --- a/tools/templates/{{ cookiecutter.project_name }}-ios/main.m +++ b/tools/templates/{{ cookiecutter.project_name }}-ios/main.m @@ -5,7 +5,7 @@ #import #import -{%- if cookiecutter.python_major == 2 %} +{%- if cookiecutter.python_major == "2" %} #include "{{ cookiecutter.kivy_dir }}/dist/root/python2/include/python2.7/Python.h" {%- else %} #include "{{ cookiecutter.kivy_dir }}/dist/root/python3/include/python3.7m/Python.h" diff --git a/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj b/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj index 937a3f9..21068e4 100755 --- a/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj +++ b/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj @@ -230,7 +230,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - {%- if cookiecutter.python_major == 2 %} + {%- if cookiecutter.python_major == "2" %} shellScript = "{{ cookiecutter.dist_dir }}/hostpython2/bin/python -OO -m compileall \"$PROJECT_DIR\"/YourApp"; {%- else %} shellScript = "{{ cookiecutter.dist_dir }}/hostpython3/bin/python -m compileall -f -b \"$PROJECT_DIR\"/YourApp"; @@ -250,7 +250,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - {%- if cookiecutter.python_major == 2 %} + {%- if cookiecutter.python_major == "2" %} shellScript = "find \"$PROJECT_DIR\"/YourApp/ -regex '.*\\.py[c]*' -delete"; {%- else %} shellScript = "find \"$PROJECT_DIR\"/YourApp/ -regex '.*\\.py' -delete";