diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2019-07-12 11:29:16 +0300 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2019-07-12 11:32:02 +0300 |
commit | 69d1b970ea84daad202d441086f80007e690a7ba (patch) | |
tree | a3d0c783aa9ec6be16e655ff75a74226d567cf20 /dev-embedded | |
parent | dev-embedded/platformio: Version bump (diff) | |
download | gentoo-69d1b970ea84daad202d441086f80007e690a7ba.tar.gz gentoo-69d1b970ea84daad202d441086f80007e690a7ba.tar.bz2 gentoo-69d1b970ea84daad202d441086f80007e690a7ba.zip |
dev-embedded/platformio: Fix py3 in scripts
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/platformio/files/platformio-4.0.0-Make-scripts-compatible-with-py2-and-py3.patch | 65 | ||||
-rw-r--r-- | dev-embedded/platformio/platformio-4.0.0.ebuild | 2 |
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-embedded/platformio/files/platformio-4.0.0-Make-scripts-compatible-with-py2-and-py3.patch b/dev-embedded/platformio/files/platformio-4.0.0-Make-scripts-compatible-with-py2-and-py3.patch new file mode 100644 index 000000000000..c899105dde6c --- /dev/null +++ b/dev-embedded/platformio/files/platformio-4.0.0-Make-scripts-compatible-with-py2-and-py3.patch @@ -0,0 +1,65 @@ +From e1d5cb23f342269e1e99b017c1082cd6208b8c9d Mon Sep 17 00:00:00 2001 +From: Alexey Shvetsov <alexxy@gentoo.org> +Date: Fri, 12 Jul 2019 11:26:27 +0300 +Subject: [PATCH] Make scripts compatible with py2 and py3 + +Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org> +--- + scripts/docspregen.py | 5 +++-- + scripts/fixsymlink.py | 4 +++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/scripts/docspregen.py b/scripts/docspregen.py +index b4e5a67f..ab43bd7c 100644 +--- a/scripts/docspregen.py ++++ b/scripts/docspregen.py +@@ -11,6 +11,7 @@ + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. ++from __future__ import print_function + + import os + import urlparse +@@ -280,7 +281,7 @@ Packages + + + def generate_platform(name, rst_dir): +- print "Processing platform: %s" % name ++ print("Processing platform: %s" % name) + + compatible_boards = [ + board for board in BOARDS if name == board['platform'] +@@ -439,7 +440,7 @@ def update_platform_docs(): + + + def generate_framework(type_, data, rst_dir=None): +- print "Processing framework: %s" % type_ ++ print("Processing framework: %s" % type_) + + compatible_platforms = [ + m for m in PLATFORM_MANIFESTS +diff --git a/scripts/fixsymlink.py b/scripts/fixsymlink.py +index a73a0109..b250b04b 100644 +--- a/scripts/fixsymlink.py ++++ b/scripts/fixsymlink.py +@@ -12,13 +12,15 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++from __future__ import print_function ++ + from os import chdir, getcwd, readlink, remove, symlink, walk + from os.path import exists, islink, join, relpath + from sys import exit as sys_exit + + + def fix_symlink(root, fname, brokenlink): +- print root, fname, brokenlink ++ print(root, fname, brokenlink) + prevcwd = getcwd() + + chdir(root) +-- +2.22.0 + diff --git a/dev-embedded/platformio/platformio-4.0.0.ebuild b/dev-embedded/platformio/platformio-4.0.0.ebuild index 3062aaa44234..5200247c4260 100644 --- a/dev-embedded/platformio/platformio-4.0.0.ebuild +++ b/dev-embedded/platformio/platformio-4.0.0.ebuild @@ -30,3 +30,5 @@ RDEPEND="${DEPEND} <dev-python/requests-3[${PYTHON_USEDEP}] >=dev-python/semantic_version-2.5.0[${PYTHON_USEDEP}] <dev-python/semantic_version-3[${PYTHON_USEDEP}]" + +PATCHES=( "${FILESDIR}/${P}-Make-scripts-compatible-with-py2-and-py3.patch" ) |