media-gfx/silicon: Apply a patch to unblock python 3.9

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red>
This commit is contained in:
YOSHIOKA Takuma
2021-01-20 21:26:01 +09:00
parent 3c87c691d9
commit 23b7a081b5
2 changed files with 52 additions and 5 deletions

View File

@@ -0,0 +1,43 @@
From b41c79a73069160af5290c328acecd499f5d216a Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel@michel-slm.name>
Date: Mon, 8 Jun 2020 22:59:11 -0700
Subject: [PATCH] Use `ElementTree` instead of `cElementTree`
`cElementTree` has been deprecated since Python 3.3; `ElementTree` will use a fast implementation whenever available.
`cElementTree` is actually removed as of Python 3.9 beta 1, and on Python 3.8 it's an alias to `ElementTree`.
See https://docs.python.org/3.8/library/xml.etree.elementtree.html
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
---
xcbgen/matcher.py | 2 +-
xcbgen/state.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py
index bfa315eb..97ae5f9f 100644
--- a/xcbgen/matcher.py
+++ b/xcbgen/matcher.py
@@ -7,7 +7,7 @@
'''
from os.path import join
-from xml.etree.cElementTree import parse
+from xml.etree.ElementTree import parse
from xcbgen.xtypes import *
diff --git a/xcbgen/state.py b/xcbgen/state.py
index 1f5479e9..95af5a40 100644
--- a/xcbgen/state.py
+++ b/xcbgen/state.py
@@ -2,7 +2,7 @@
This module contains the namespace class and the singleton module class.
'''
from os.path import dirname, basename
-from xml.etree.cElementTree import parse
+from xml.etree.ElementTree import parse
from xcbgen import matcher
from xcbgen.error import *

View File

@@ -1,4 +1,4 @@
# Copyright 2017-2020 Gentoo Authors
# Copyright 2017-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Auto-Generated by cargo-ebuild 0.3.1
@@ -188,11 +188,8 @@ LICENSE="Apache-2.0 Boost-1.0 BSD-2 CC0-1.0 MIT MPL-2.0 ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# Python 3.9 cannot be used for now.
# See <https://github.com/rtbo/rust-xcb/issues/84>
# (fixed but not yet released).
BDEPEND="
<dev-lang/python-3.9
dev-lang/python
virtual/pkgconfig"
DEPEND="
media-libs/fontconfig
@@ -201,6 +198,13 @@ DEPEND="
RDEPEND="${DEPEND}
x11-misc/xclip"
src_unpack() {
cargo_src_unpack
# Apply patch <https://github.com/rtbo/rust-xcb/pull/87> for python 3.9 support.
( cd "${WORKDIR}"/cargo_home/gentoo/xcb-0.8.2 && eapply "${FILESDIR}"/rust-xcb-0.8.2-python-3.9.patch )
}
src_install() {
cargo_src_install