mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/qtsass: enable py3.10
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
37
dev-python/qtsass/files/qtsass-0.3.0-fix-py3.10.patch
Normal file
37
dev-python/qtsass/files/qtsass-0.3.0-fix-py3.10.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From cbea8d8729282106373a12b9e08bcaac8abeb52f Mon Sep 17 00:00:00 2001
|
||||
From: goanpeca <goanpeca@gmail.com>
|
||||
Date: Tue, 24 Mar 2020 11:51:28 -0500
|
||||
Subject: [PATCH] Add check for deprecated api between 2 and 3 versions
|
||||
|
||||
---
|
||||
qtsass/api.py | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/qtsass/api.py b/qtsass/api.py
|
||||
index 7ea4138..7a65fe2 100644
|
||||
--- a/qtsass/api.py
|
||||
+++ b/qtsass/api.py
|
||||
@@ -13,9 +13,9 @@
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
# Standard library imports
|
||||
-from collections import Mapping, Sequence
|
||||
import logging
|
||||
import os
|
||||
+import sys
|
||||
|
||||
# Third party imports
|
||||
import sass
|
||||
@@ -26,6 +26,12 @@
|
||||
from qtsass.importers import qss_importer
|
||||
|
||||
|
||||
+if sys.version_info[0] == 3:
|
||||
+ from collections.abc import Mapping, Sequence
|
||||
+else:
|
||||
+ from collections import Mapping, Sequence
|
||||
+
|
||||
+
|
||||
# yapf: enable
|
||||
|
||||
# Constants
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
@@ -17,13 +17,15 @@ LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="dev-python/libsass[${PYTHON_USEDEP}]"
|
||||
RDEPEND="dev-python/libsass[${PYTHON_USEDEP}]"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-fix-py3.10.patch"
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_prepare_all() {
|
||||
EPYTEST_DESELECT=(
|
||||
# assert 1 == 2
|
||||
sed -i -e 's:test_watchers:_&:' tests/test_watchers.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
tests/test_watchers.py::test_watchers
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user