summaryrefslogtreecommitdiff
path: root/dev-python/pyxdg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/pyxdg
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/pyxdg')
-rw-r--r--dev-python/pyxdg/Manifest3
-rw-r--r--dev-python/pyxdg/files/pyxdg-0.26-python384.patch58
-rw-r--r--dev-python/pyxdg/pyxdg-0.26-r2.ebuild20
3 files changed, 67 insertions, 14 deletions
diff --git a/dev-python/pyxdg/Manifest b/dev-python/pyxdg/Manifest
index dce514c4c433..b2cf10b2d9af 100644
--- a/dev-python/pyxdg/Manifest
+++ b/dev-python/pyxdg/Manifest
@@ -1,3 +1,4 @@
+AUX pyxdg-0.26-python384.patch 1782 BLAKE2B 61eccc53300424879b2ff88d0f8e11654616dddf045d7edc3a67a8edf063b8517676276be6a9ee94de69243524cd46dd082846a13f2304b84d26a6f5bb31944f SHA512 e6d1af2b0fe52c85751e6e468576533bf0e718e58b74623fe7e84e2004f7a19353dc16591fe054cb78719318f1f5a70e96f4a009a292f1f8112592ea938eca5f
DIST pyxdg-rel-0.26.tar.gz 68435 BLAKE2B a95948db17da9909554e82c0ccf590c3f94ec26d1e34d5ba335868233a649368c08ef30cc19e878310ef038e5bdb6d18cd0e15e9413d9c54b70931f25844ee8c SHA512 0c11bccb74b8c0d98f3c63c318d35d08e1c3bbea128bf7b82792e1bdc0a60c8c4d6414b0612b19296cfb48f7951dfc6dd55ac8d23238e370e7faf6c4f64d1fb6
-EBUILD pyxdg-0.26-r2.ebuild 808 BLAKE2B 60d1ff820bc2c423f00b59383cfa8fa63dbc30a3d24186d60949020d986f4ed58f002dfe4287f1dccb6a1fa581ea893b37e6ced1f11251778f5a2897ea0bbf5b SHA512 e0181764f2464ab327b720f8ebce5526d7bd082334e3b924df53329335a45949408415fc50cd2c6c558edb46ca5cedfa58cf2189fcea9e26c231da903c6d7cd0
+EBUILD pyxdg-0.26-r2.ebuild 775 BLAKE2B 282ba568722d9a2c0a7a85b4d4bdc8e57281c700fc641e4911338d01665b3360a4fe182df8df4488609b326b7a25e3f96c7f902b525792b754fe1f125eceb542 SHA512 d954a33de36ff5479565bdffeff9bf75df8b40f797f3e5e1967eec7700e4d7d00749fbdcd8500b147d3f173d0fbe0f1ad762f4cd35c320843660a7f2ddb88472
MISC metadata.xml 487 BLAKE2B 4967a9b3c1a439c3cc53208ad2095031b08c4848ade6f2bb08a69aedbef5f5046f28764db62bcf3cac4c1c33c68958a7d2aba03a3b4cb7b7a407e41eddfec5f1 SHA512 f00421023d46b9aa32d8038c5ba8bfdb1b60a732932d64f7d11fe6f0c163b734182e2162dde2ba663d7c74ba8c754ece721dfbfa0b8fa3081be622dfff3949ea
diff --git a/dev-python/pyxdg/files/pyxdg-0.26-python384.patch b/dev-python/pyxdg/files/pyxdg-0.26-python384.patch
new file mode 100644
index 000000000000..def4a835f036
--- /dev/null
+++ b/dev-python/pyxdg/files/pyxdg-0.26-python384.patch
@@ -0,0 +1,58 @@
+From 9b913229ace838958e51a16cabc41905a2460f7b Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Tue, 25 Aug 2020 00:24:53 +0200
+Subject: [PATCH] Fix compatibility with >=python-3.8.4
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ xdg/Menu.py | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/xdg/Menu.py b/xdg/Menu.py
+index 1d03cad..ee406bd 100644
+--- a/xdg/Menu.py
++++ b/xdg/Menu.py
+@@ -21,6 +21,7 @@ def print_menu(menu, tab=0):
+ import locale
+ import subprocess
+ import ast
++import sys
+ try:
+ import xml.etree.cElementTree as etree
+ except ImportError:
+@@ -35,6 +36,17 @@ def print_menu(menu, tab=0):
+ import xdg.Config
+
+
++def _ast_const(name):
++ if sys.version_info >= (3, 4):
++ name = ast.literal_eval(name)
++ if sys.version_info >= (3, 8):
++ return ast.Constant(name)
++ else:
++ return ast.NameConstant(name)
++ else:
++ return ast.Name(id=name, ctx=ast.Load())
++
++
+ def _strxfrm(s):
+ """Wrapper around locale.strxfrm that accepts unicode strings on Python 2.
+
+@@ -754,7 +766,7 @@ def parse_rule(self, node):
+ if expr:
+ tree.body = expr
+ else:
+- tree.body = ast.Name('False', ast.Load())
++ tree.body = _ast_const('False')
+ ast.fix_missing_locations(tree)
+ return Rule(type, tree)
+
+@@ -781,7 +793,7 @@ def parse_rule_node(self, node):
+ expr = self.parse_bool_op(node, ast.Or())
+ return ast.UnaryOp(ast.Not(), expr) if expr else None
+ elif tag == 'All':
+- return ast.Name('True', ast.Load())
++ return _ast_const('True')
+ elif tag == 'Category':
+ category = node.text
+ return ast.Compare(
diff --git a/dev-python/pyxdg/pyxdg-0.26-r2.ebuild b/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
index 94de62c59600..b86bc4b81e90 100644
--- a/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
+++ b/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
@@ -3,16 +3,16 @@
EAPI=7
-DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_USE_SETUPTOOLS="no"
+MY_P="${PN}-rel-${PV}"
PYTHON_COMPAT=( python{3_6,3_7,3_8,3_9} )
inherit distutils-r1
-MY_P=${PN}-rel-${PV}
DESCRIPTION="A Python module to deal with freedesktop.org specifications"
HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
-# official mirror of the git repo
-SRC_URI="https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
+SRC_URI="https://github.com/takluyver/${PN}/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2"
SLOT="0"
@@ -20,14 +20,8 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
-DEPEND="
- test? (
- dev-python/nose[${PYTHON_USEDEP}]
- x11-themes/hicolor-icon-theme
- )"
+DEPEND="test? ( x11-themes/hicolor-icon-theme )"
-S=${WORKDIR}/${MY_P}
+PATCHES=( "${FILESDIR}/${P}-python384.patch" )
-python_test() {
- nosetests -v || die
-}
+distutils_enable_tests nose