python-parameterized/python-parameterized.spec

69 lines
1.8 KiB
RPMSpec
Raw Permalink Normal View History

2020-06-18 17:08:57 +08:00
%global srcname parameterized
Name: python-%{srcname}
Version: 0.9.0
Release: 1
2020-06-18 17:08:57 +08:00
Summary: Parameterized testing with any Python test framework
2022-05-09 17:49:27 +08:00
License: BSD-2-Clause
2020-06-18 17:08:57 +08:00
URL: https://pypi.python.org/pypi/parameterized
2022-04-29 15:50:57 +08:00
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
2020-06-18 17:08:57 +08:00
BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel
2020-06-18 17:08:57 +08:00
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}
sed -r -i 's/^import mock/from unittest import mock/' parameterized/test.py
sed -r -i 's/assert_equal\(missing/# &/' parameterized/test.py
2020-06-18 17:08:57 +08:00
%build
%pyproject_build
2020-06-18 17:08:57 +08:00
%install
%pyproject_install parameterized==%{version}
2020-06-18 17:08:57 +08:00
%check
export PYTHONPATH=%{buildroot}%{python3_sitelib}
nose2 -v
pytest -v parameterized/test.py
2020-06-18 17:08:57 +08:00
%{__python3} -m unittest -v parameterized.test
%files -n python3-%{srcname}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{srcname}*
2020-06-18 17:08:57 +08:00
%changelog
* Sat May 06 2023 xu_ping <707078654@qq.com> - 0.9.0-1
- Upgrade to 0.9.0
* Tue Jan 10 2023 Ge Wang <wangge20@h-partners.com> - 0.8.1-3
- Replace nose2-%{python3_version} with nose2 due to python-nose2 updated to version 0.12.0
2022-05-09 17:49:27 +08:00
* Mon May 9 2022 yaoxin <yaoxin30@h-partners.com> - 0.8.1-2
- License compliance rectification
2022-04-29 15:50:57 +08:00
* Fri Apr 29 2022 yaoxin <yaoxin30@h-partners.com> - 0.8.1-1
- Update to 0.8.1 and remove python-nose
2020-06-18 17:08:57 +08:00
* Thu Jun 11 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 0.7.4-1
- build for openEuler