Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
92afe6c9c2
!11 [sync] PR-10: fix build error : modify setup.py get version class
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-03-18 03:12:46 +00:00
yangchenguang
8027fb7ad5 fix build error : modify late_version return to str
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
(cherry picked from commit 2ea534991edc889586a689c60e6e8896f1479a32)
2024-03-18 11:03:05 +08:00
openeuler-ci-bot
5f2d6c6b7e
!9 【轻量级 PR】:Fix changelog error
From: @fu-shanqing 
Reviewed-by: @licihua 
Signed-off-by: @licihua
2022-06-14 11:21:09 +00:00
付善庆
58763a3df8
Fix changelog error 2022-06-08 06:43:27 +00:00
openeuler-ci-bot
ae3ed21a95
!5 修复python3.10不支持collections.MutableMapping的问题
From: @wu-leilei 
Reviewed-by: @ruebb 
Signed-off-by: @ruebb
2022-04-01 10:21:05 +00:00
wu-leilei
3810d22a64 fix collections.MutableMapping no support for python 3.10 2022-03-31 11:41:48 +08:00
openeuler-ci-bot
ba710589dd !2 Remove python2-unittest2 subpackage
From: @jpzhang187
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-09-11 21:12:18 +08:00
jpzhang
0a5bb80097 Remove python2-unittest2 subpackage 2020-09-11 20:24:05 +08:00
openeuler-ci-bot
3bbaac91ca !1 python-unittest2
Merge pull request !1 from wangef/master
2020-05-08 10:33:06 +08:00
wwx913452
aa3e60e573 added python-unittest2.yaml 2020-05-07 19:34:34 +08:00
4 changed files with 56 additions and 26 deletions

View File

@ -0,0 +1,26 @@
From de3ec76aba458b2b2ba58d1707dc9ecc82387eab Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Thu, 14 Mar 2024 17:46:00 +0800
Subject: [PATCH] Modify late_version return to str
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 416afbe..fbaafa7 100755
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ class late_version:
return str(self) + other
def replace(self, old, new):
return str(self).replace(old, new)
-VERSION = late_version()
+VERSION = str(late_version())
NAME = 'unittest2'
--
2.39.1

View File

@ -0,0 +1,14 @@
diff -Nur a/unittest2/compatibility.py b/unittest2/compatibility.py
--- a/unittest2/compatibility.py 2014-10-29 18:51:58.000000000 +0800
+++ b/unittest2/compatibility.py 2022-03-31 11:21:09.580805329 +0800
@@ -1,4 +1,10 @@
import collections
+try:
+ from collections import abc
+ collections.MutableMapping = abc.MutableMapping
+except:
+ pass
+
import os
import sys

View File

@ -1,6 +1,6 @@
Name: python-unittest2
Version: 1.1.0
Release: 16
Release: 19
Summary: New features added to the unittest testing framework in Python 2.7 and onwards
License: BSD
URL: http://pypi.python.org/pypi/unittest2
@ -8,6 +8,8 @@ Source0: https://pypi.python.org/packages/source/u/unittest2/unittest2-%{
Patch0000: unittest2-1.1.0-remove-argparse-from-requires.patch
Patch0001: unittest2-1.1.0-backport-tests-from-py3.5.patch
Patch0002: fix-collections.MutableMapping-no-support-for-python-3.10.patch
Patch0003: Modify-late_version-return-to-str.patch
BuildArch: noarch
%description
@ -15,17 +17,6 @@ unittest2 is a backport of the new features added to
the unittest testing framework in Python 2.7 and onwards.
It is tested to run on Python 2.6, 2.7, 3.2, 3.3, 3.4 and pypy.
%package -n python2-unittest2
Summary: New features added to the unittest testing framework in Python 2.7 and onwards
%{?python_provide:%python_provide python2-unittest2}
BuildRequires: python2-devel python2-setuptools python2-six python2-traceback2
Requires: python2-traceback2 python2-setuptools python2-six
%description -n python2-unittest2
unittest2 is a backport of the new features added to
the unittest testing framework in Python 2.7 and onwards.
It is tested to run on Python 2.6, 2.7, 3.2, 3.3, 3.4 and pypy.
%package -n python3-unittest2
Summary: New features added to the unittest testing framework in Python 2.7 and onwards
%{?python_provide:%python_provide python3-unittest2}
@ -42,7 +33,6 @@ It is tested to run on Python 2.6, 2.7, 3.2, 3.3, 3.4 and pypy.
rm -rf unittest2.egg-info
%build
%py2_build
%py3_build
%install
@ -53,22 +43,9 @@ ln -s unit2-%{python3_version} unit2-3
ln -s unit2-%{python3_version} python3-unit2
cd -
%py2_install
cd %{buildroot}%{_bindir}
mv unit2 unit2-%{python2_version}
ln -s unit2-%{python2_version} unit2-2
ln -s unit2-2 unit2
cd -
%check
%{__python2} -m unittest2
%{__python3} -m unittest2
%files -n python2-unittest2
%doc README.txt
%{_bindir}/unit2*
%{python2_sitelib}/unittest2*
%files -n python3-unittest2
%doc README.txt
%{_bindir}/unit2-*
@ -76,5 +53,14 @@ cd -
%{python3_sitelib}/unittest2*
%changelog
* Thu Mar 14 2024 yangchenguang <yangchenguang@kylinsec.com.cn> - 1.1.0-19
- fix build error : modify late_version return to str
* Tue Mar 22 2022 wulei <wulei80@huawei.com> - 1.1.0-18
- Fix collections.MutableMapping no support for python 3.10
* Fri Sep 11 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.1.0-17
- Remove python2-unittest2 subpackage
* Wed Nov 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.0-16
- Package init

4
python-unittest2.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: unittest2
tag_prefix: ^v
seperator: .