!2 修复python单元测试失败问题
From: @wu-leilei Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
b1e12d081e
61
gyp-python39.patch
Normal file
61
gyp-python39.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From: cclauss <cclauss@me.com>
|
||||
Date: Fri, 8 Nov 2019 22:56:52 +0100
|
||||
Subject: [PATCH] test: fix Python unittests
|
||||
|
||||
---
|
||||
|
||||
diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
|
||||
index b268d229..03c99cab 100644
|
||||
--- a/pylib/gyp/common.py
|
||||
+++ b/pylib/gyp/common.py
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
-import collections
|
||||
import errno
|
||||
import filecmp
|
||||
import os.path
|
||||
@@ -12,6 +11,11 @@ import re
|
||||
import tempfile
|
||||
import sys
|
||||
|
||||
+try:
|
||||
+ from collections.abc import MutableSet
|
||||
+except ImportError:
|
||||
+ from collections import MutableSet
|
||||
+
|
||||
|
||||
# A minimal memoizing decorator. It'll blow up if the args aren't immutable,
|
||||
# among other "problems".
|
||||
@@ -494,7 +498,7 @@ def uniquer(seq, idfun=None):
|
||||
|
||||
|
||||
# Based on http://code.activestate.com/recipes/576694/.
|
||||
-class OrderedSet(collections.MutableSet):
|
||||
+class OrderedSet(MutableSet):
|
||||
def __init__(self, iterable=None):
|
||||
self.end = end = []
|
||||
end += [None, end, end] # sentinel node for doubly linked list
|
||||
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
|
||||
index 843e7067..327fe8d2 100644
|
||||
--- a/pylib/gyp/generator/msvs.py
|
||||
+++ b/pylib/gyp/generator/msvs.py
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
-import collections
|
||||
+from collections import OrderedDict
|
||||
import copy
|
||||
import ntpath
|
||||
import os
|
||||
@@ -195,7 +195,7 @@ def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None,
|
||||
if not prefix: prefix = []
|
||||
result = []
|
||||
excluded_result = []
|
||||
- folders = collections.OrderedDict()
|
||||
+ folders = OrderedDict()
|
||||
# Gather files into the final result, excluded, or folders.
|
||||
for s in sources:
|
||||
if len(s) == 1:
|
||||
7
gyp.spec
7
gyp.spec
@ -2,7 +2,7 @@
|
||||
%{expand: %%global archivename gyp-%{version}%{?revision:-git%{revision}}}
|
||||
Name: gyp
|
||||
Version: 0.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Generate Your Projects
|
||||
License: BSD
|
||||
URL: http://code.google.com/p/gyp
|
||||
@ -20,6 +20,8 @@ Patch1: gyp-ninja-build.patch
|
||||
Patch2: gyp-python3.patch
|
||||
Patch3: gyp-python38.patch
|
||||
Patch4: gyp-fix-cmake.patch
|
||||
# https://github.com/nodejs/node-gyp/pull/1961
|
||||
Patch5: gyp-python39.patch
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
Requires: python3-setuptools
|
||||
BuildRequires: gcc gcc-c++ ninja-build
|
||||
@ -53,5 +55,8 @@ done
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Tue Mar 22 2022 wulei <wulei80@huawei.com> - 0.1-2
|
||||
- Fix python unittests
|
||||
|
||||
* Fri Aug 21 2020 Ge Wang <wangge20@huawei.com> - 0.1-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user