diff --git a/recipes/hostpython2/__init__.py b/recipes/hostpython2/__init__.py index 6fb5b6b..44bc20c 100644 --- a/recipes/hostpython2/__init__.py +++ b/recipes/hostpython2/__init__.py @@ -14,7 +14,7 @@ class Hostpython2Recipe(Recipe): def init_with_ctx(self, ctx): super(Hostpython2Recipe, self).init_with_ctx(ctx) - self.set_hostpython(self, 2.7) + self.set_hostpython(self, "2.7") self.ctx.so_suffix = ".so" self.ctx.hostpython = join(self.ctx.dist_dir, "hostpython2", "bin", "python") self.ctx.hostpgen = join(self.ctx.dist_dir, "hostpython2", "bin", "pgen") diff --git a/recipes/hostpython3/__init__.py b/recipes/hostpython3/__init__.py index 740dcc9..5dabb31 100644 --- a/recipes/hostpython3/__init__.py +++ b/recipes/hostpython3/__init__.py @@ -14,7 +14,7 @@ class Hostpython3Recipe(Recipe): def init_with_ctx(self, ctx): super(Hostpython3Recipe, self).init_with_ctx(ctx) - self.set_hostpython(self, 3.7) + self.set_hostpython(self, "3.7") self.ctx.so_suffix = ".cpython-37m-darwin.so" self.ctx.hostpython = join(self.ctx.dist_dir, "hostpython3", "bin", "python") self.ctx.hostpgen = join(self.ctx.dist_dir, "hostpython3", "bin", "pgen") diff --git a/recipes/python2/__init__.py b/recipes/python2/__init__.py index b59130b..eb2895e 100644 --- a/recipes/python2/__init__.py +++ b/recipes/python2/__init__.py @@ -14,7 +14,7 @@ class Python2Recipe(Recipe): def init_with_ctx(self, ctx): super(Python2Recipe, self).init_with_ctx(ctx) - self.set_python(self, 2.7) + self.set_python(self, "2.7") ctx.python_ver_dir = "python2.7" ctx.python_prefix = join(ctx.dist_dir, "root", "python2") ctx.site_packages_dir = join( diff --git a/recipes/python3/__init__.py b/recipes/python3/__init__.py index 231c519..b5f08fd 100644 --- a/recipes/python3/__init__.py +++ b/recipes/python3/__init__.py @@ -14,7 +14,7 @@ class Python3Recipe(Recipe): def init_with_ctx(self, ctx): super(Python3Recipe, self).init_with_ctx(ctx) - self.set_python(self, 3.7) + self.set_python(self, "3.7") ctx.python_ver_dir = "python3.7" ctx.python_prefix = join(ctx.dist_dir, "root", "python3") ctx.site_packages_dir = join( diff --git a/toolchain.py b/toolchain.py index 7b51445..96bb407 100755 --- a/toolchain.py +++ b/toolchain.py @@ -657,7 +657,7 @@ class Recipe(object): hostpython)) print("ERROR: You can have only one hostpython version compiled") sys.exit(1) - self.ctx.python_major = int(version) + self.ctx.python_major = version.split('.')[0] self.ctx.hostpython_ver = version self.ctx.hostpython_recipe = instance