From 8d75ef2db1292173ffb493a59435d5f43be803ad Mon Sep 17 00:00:00 2001 From: gentoo90 Date: Fri, 22 Sep 2023 21:49:34 +0300 Subject: [PATCH] ebuild: switch to newer versions of Python --- superflore/generators/ebuild/ebuild.py | 4 ++-- tests/ebuild/simple_expected.ebuild | 2 +- tests/test_ebuild.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/superflore/generators/ebuild/ebuild.py b/superflore/generators/ebuild/ebuild.py index 18ef7e58..06abf1d0 100644 --- a/superflore/generators/ebuild/ebuild.py +++ b/superflore/generators/ebuild/ebuild.py @@ -141,10 +141,10 @@ def get_ebuild_text(self, distributor, license_text): ret += self.get_eapi_line() if self.python_3 and not self.is_ros2: # enable python 2.7 and python 3.5 - ret += self.get_python_compat(['2_7', '3_5', '3_6']) + ret += self.get_python_compat(['2_7', '3_10', '3_11']) elif self.python_3: # only use 3.5, 3.6 for ROS 2 - ret += self.get_python_compat(['3_5', '3_6']) + ret += self.get_python_compat(['3_10', '3_11']) else: # fallback to python 2.7 ret += self.get_python_compat(['2_7']) diff --git a/tests/ebuild/simple_expected.ebuild b/tests/ebuild/simple_expected.ebuild index 1237a4bb..09c38c7a 100644 --- a/tests/ebuild/simple_expected.ebuild +++ b/tests/ebuild/simple_expected.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the BSD license EAPI=8 -PYTHON_COMPAT=( python{2_7,3_5,3_6} ) +PYTHON_COMPAT=( python{2_7,3_10,3_11} ) inherit ros-cmake diff --git a/tests/test_ebuild.py b/tests/test_ebuild.py index 9112ba77..4802cc71 100644 --- a/tests/test_ebuild.py +++ b/tests/test_ebuild.py @@ -153,7 +153,7 @@ def test_default_python2_python3(self): """Test That Python2/3 Is the Default""" ebuild = self.get_ebuild() got_text = ebuild.get_ebuild_text('Open Source Robotics Foundation', 'BSD') - self.assertTrue('PYTHON_COMPAT=( python{2_7,3_5,3_6} )' in got_text) + self.assertTrue('PYTHON_COMPAT=( python{2_7,3_10,3_11} )' in got_text) def test_has_patches(self): """Test Patch Code Generation"""