!7 UpdatePackage

From: @Wangjunqi123 
Reviewed-by: @shinwell_hu 
Signed-off-by: @shinwell_hu
This commit is contained in:
openeuler-ci-bot 2022-11-08 11:23:19 +00:00 committed by Gitee
commit 37ef368657
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 71 additions and 38 deletions

Binary file not shown.

BIN
nose2-0.12.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,21 +1,16 @@
%global srcname nose2
%global _empty_manifest_terminate_build 0
Name: python-nose2
Version: 0.12.0
Release: 1
Summary: Next generation of nicer testing for Python
License: BSD-2-Clause
URL: https://github.com/nose-devs/nose2
Source0: https://files.pythonhosted.org/packages/6e/0e/7c8c0ddf8a8adf1f2af273a25867c6edd479ca1ee59d5fa6edc70ec249b3/nose2-0.12.0.tar.gz
BuildArch: noarch
Name: python-%{srcname}
Version: 0.11.0
Release: 1
Summary: Next generation of nicer testing for Python
License: BSD-2-Clause
URL: https://nose2.readthedocs.org
Source0: https://files.pythonhosted.org/packages/1f/24/d4d16329a7c58d342a0345bbcd1dc81321fb7a1de41dc3361a48f2381e0e/nose2-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-cov-core
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-six >= 1.6
Requires: python%{python3_pkgversion}-cov-core >= 1.12
%description
nose2 is the next generation of nicer testing for Python, based on the plugins
@ -29,16 +24,33 @@ branch of unittest2. nose2 aims to improve on nose by:
In service of some those goals, some features of nose will not be supported in
nose2. See the documentation for a thorough rundown.
%package -n python3-nose2
Summary: Next generation of nicer testing for Python
Provides: python-nose2 = %{version}-%{release}
Conflicts: python2-nose2 < 0.7.4-3
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-cov-core
%package -n python%{python3_pkgversion}-%{srcname}
Summary: Next generation of nicer testing for Python
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-six >= 1.6
Requires: python%{python3_pkgversion}-cov-core >= 1.12
Conflicts: python2-%{srcname} < 0.7.4-3
%description -n python3-nose2
nose2 is the next generation of nicer testing for Python, based on the plugins
branch of unittest2. nose2 aims to improve on nose by:
- providing a better plugin API
- being easier for users to configure
- simplifying internal interfaces and processes
- supporting Python 2 and 3 from the same codebase, without translation
- encouraging greater community involvement in its development
%description -n python%{python3_pkgversion}-%{srcname}
In service of some those goals, some features of nose will not be supported in
nose2. See the documentation for a thorough rundown.
%package help
Summary: Development documents and examples for nose2
Provides: python3-nose2-doc
%description help
nose2 is the next generation of nicer testing for Python, based on the plugins
branch of unittest2. nose2 aims to improve on nose by:
- providing a better plugin API
@ -51,29 +63,49 @@ In service of some those goals, some features of nose will not be supported in
nose2. See the documentation for a thorough rundown.
%prep
%autosetup -n %{srcname}-%{version} -p0
%autosetup -n nose2-%{version}
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-nose2 -f filelist.lst
%dir %{python3_sitelib}/*
%check
PYTHONPATH=`pwd` %{__python3} -m nose2.__main__ -v
%files -n python%{python3_pkgversion}-%{srcname}
%license license.txt
%doc README.rst
%{python3_sitelib}/*
%{_bindir}/nose2-%{python3_version}
%{_bindir}/nose2
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Nov 08 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.12.0-1
- Update package to version 0.12.0
* Wed Jun 29 2022 yaoxin <yaoxin30@h-partner.com> - 0.11.0-1
- Update to 0.11.0
@ -82,3 +114,4 @@ PYTHONPATH=`pwd` %{__python3} -m nose2.__main__ -v
* Thu Jun 11 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 0.9.2-1
- build for openEuler