Parcourir la source

tuir: ebuild fix (Python compat + config.py patch)

slash il y a 4 mois
Parent
commit
1c9ebde6be

+ 1 - 1
README.md

@@ -28,7 +28,7 @@ Package list:
 * media-fonts/square            - [1.0]              -- A TTF font designed to make characters fill a square space
 * media-libs/libtxc_dxtn        - [1.0.1]            -- Implementation of the S3 Texture Compression
 * net-misc/ddgr                 - [2.2]              -- A command line utility to search DuckDuckGo from the terminal
-* net-misc/tuir                 - [1.29.0-r1]        -- A terminal user interface (TUI) for Reddit
+* net-misc/tuir                 - [1.29.0-r2]        -- A terminal user interface (TUI) for Reddit
 * net-p2p/bob-bin               - [9999]             -- B·o·B, an universal & secure peer-to-peer file-transfer (binary version)
 * sys-process/btop              - [1.3.0]            -- A complete monitor of machine resources
 * x11-misc/find-cursor          - [1.8]              -- Simple XLib program to highlight the cursor position

+ 2 - 0
net-misc/tuir/Manifest

@@ -1,3 +1,5 @@
+AUX tuir-1.29.0-config.py-readfp.patch 653 BLAKE2B 2cb1d615f1abd8c6bd87144838a9f539b18a2ed2e553c30dd71ed196f81d973e31325e5ee8a18121866ee33f3b2b45ea6fede5be113c2cae6fa862e5a5361ac8 SHA512 f4145308208a260af4a2e8aaa50f11841f601bd221ac3a1bf38651ea48a8c197fe685454de70ec28f9b89d0ee5025e6e52c5488311c885d5ce0449cafc3b3b5b
 DIST tuir-v1.29.0.tar.gz 17689935 BLAKE2B 8bd2c046a350804eaa02f83ab71b8c3e838411dc5b78929b873f95808dd09cd3b2634a377747a8094e896f02875f3af75e239a1cd7713a295bc573b0aa79b605 SHA512 254dcbb825011d0651f4a899d2fbfbd7f4366f68aad95dcc9790876c0af63d5b2ced4d50f36d98e683b2d53d7e5819110ec3e5964fb92b9c69f40b3d43f04e1b
 EBUILD tuir-1.29.0-r1.ebuild 731 BLAKE2B 90c35871cc772064a7c03aa2e1e9559300aa3f269bd35935087ebc379ca8977c131b0caea80c4a0cdbc8826418696eb3473afdc56bce6c5b354d10e5d2a25526 SHA512 31a285e3b0c6e5f9bcf5840318de5769bdbe488cad6c6e4a9305722a18aab1d6e210eda34cc9950db1952937e0dd6b49a4d5cbfea9a37f50f5b357fd33287cc9
+EBUILD tuir-1.29.0-r2.ebuild 800 BLAKE2B 6d99a83f2dbafbde004805edacb321d2bdac891077f67c94ac16e438cc65c1a41fc82f303ee3325f363400b5e7be43dcd607f17dc4422455682a3e92d127c2c6 SHA512 9df9dfcf765c4b164eb531245e0df0261b66e34a32cfd7d698c8beaee3c6a11d51cc063264184df32524ef1b02537856a60ebb810857b88342ed654f3a3a542c
 EBUILD tuir-1.29.0.ebuild 726 BLAKE2B 79b5d5f36b4ebacb560855311537808a6207e0ae1f35a5b7ed50c6e4a8ab924c72dfb1f9cd074d6cb847502c3b8155b2681b6126ea0536f24ceab18090a0c464 SHA512 898bca6027907a7326294c9b35ff5f322373d7741081b675060ec447bcc53de41cf0cd817e5551d0784828d49a4f5c8fcf62b36c4486f83994edb787045bf0f6

+ 22 - 0
net-misc/tuir/files/tuir-1.29.0-config.py-readfp.patch

@@ -0,0 +1,22 @@
+--- a/tuir/config.py	2024-06-25 11:09:03.587702247 +0200
++++ b/tuit/config.py	2024-06-25 11:43:03.826798382 +0200
+@@ -2,6 +2,7 @@
+ from __future__ import unicode_literals
+ 
+ import os
++import sys
+ import codecs
+ import shutil
+ import argparse
+@@ -131,7 +132,10 @@
+         config = configparser.RawConfigParser()
+         if os.path.exists(filename):
+             with codecs.open(filename, encoding='utf-8') as fp:
+-                config.readfp(fp)
++                if sys.version_info.major >= 3:
++                    config.read_file(fp)
++                else:
++                    config.readfp(fp)
+ 
+         return cls._parse_tuir_file(config)
+ 

+ 36 - 0
net-misc/tuir/tuir-1.29.0-r2.ebuild

@@ -0,0 +1,36 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..13} )
+PYTHON_REQ_USE="ncurses"
+
+inherit distutils-r1
+
+DESCRIPTION="A terminal user interface (TUI) for Reddit"
+HOMEPAGE="https://gitlab.com/ajak/tuir"
+SRC_URI="https://gitlab.com/ajak/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+RDEPEND="
+	dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+	dev-python/decorator[${PYTHON_USEDEP}]
+	dev-python/kitchen[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+BDEPEND="test? ( dev-python/vcrpy )"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-config.py-readfp.patch
+	eapply_user
+}
+