python-parameterized/python-parameterized.spec
cherry530 9d48e3fc17 Upgrade 0.8.1
Signed-off-by: cherry530 <xuping33@huawei.com>
2022-10-17 18:04:29 +08:00

64 lines
1.6 KiB
RPMSpec

%global srcname parameterized
Name: python-%{srcname}
Version: 0.8.1
Release: 1
Summary: Parameterized testing with any Python test framework
License: BSD-2-Clause
URL: https://pypi.python.org/pypi/parameterized
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
Patch0:parameterized-pr116-pytest4.patch
Patch1:remove_nose.patch
BuildArch: noarch
%description
%{summary}.
%package -n python3-%{srcname}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose2
BuildRequires: python3-pytest
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
%{summary}.
Python 3 version.
%prep
%autosetup -p1 -n %{srcname}-%{version}
%build
%py3_build
%install
%py3_install
%check
sed -i 's|^import mock|from unittest import mock|' parameterized/test.py
export PYTHONPATH=%{buildroot}%{python3_sitelib}
nose2-%{python3_version} -v
py.test-%{python3_version} -v parameterized/test.py
%{__python3} -m unittest -v parameterized.test
%files -n python3-%{srcname}
%license LICENSE.txt
%doc CHANGELOG.txt README.rst
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%changelog
* Mon Oct 17 2022 xu_ping <xuping33@h-partners.com> - 0.8.1-1
- Update to 0.8.1 and add patches to fix problems that cannot be tested using python-nose
* Sat Jan 8 2022 liyanan <liyanan32@huawei.com> - 0.7.4-2
- Drop the python-nose dependency
* Thu Jun 11 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 0.7.4-1
- build for openEuler