From: @small_leek Reviewed-by: @miao_kaibo Signed-off-by: @miao_kaibo
This commit is contained in:
commit
92271f796d
BIN
pytest-3.6.4.tar.gz
Normal file
BIN
pytest-3.6.4.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
152
pytest.spec
152
pytest.spec
@ -1,30 +1,20 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
# the testsuite is curremtly not fully compatible with python3
|
||||||
Name: python-pytest
|
%bcond_with tests
|
||||||
Version: 6.0.2
|
|
||||||
Release: 1
|
|
||||||
Summary: pytest: simple powerful testing with Python
|
|
||||||
License: MIT
|
|
||||||
URL: https://docs.pytest.org/en/latest/
|
|
||||||
Source0: https://files.pythonhosted.org/packages/d4/df/bd7c25c4fe809a17315b3fc9878edf48d31dde7b431b6836848b063c0428/pytest-6.0.2.tar.gz
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
Requires: python3-attrs
|
%global pylib_version 1.5.0
|
||||||
Requires: python3-iniconfi
|
%global with_help 1
|
||||||
Requires: python3-packagin
|
|
||||||
Requires: python3-pluggy
|
Name: pytest
|
||||||
Requires: python3-py
|
Version: 3.6.4
|
||||||
Requires: python3-tom
|
Release: 4
|
||||||
Requires: python3-pathlib2
|
Summary: A mature full-featured Python testing tool
|
||||||
Requires: python3-importlib-metadata
|
License: MIT
|
||||||
Requires: python3-atomicwrites
|
URL: http://pytest.org
|
||||||
Requires: python3-colorama
|
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
|
||||||
Requires: python3-mypy
|
BuildArch: noarch
|
||||||
Requires: python3-argcomplete
|
%if 0%{?with_help}
|
||||||
Requires: python3-hypothesis
|
BuildRequires: %{_bindir}/sphinx-build-3 %{_bindir}/rst2html
|
||||||
Requires: python3-mock
|
%endif
|
||||||
Requires: python3-nose
|
|
||||||
Requires: python3-requests
|
|
||||||
Requires: python3-xmlschema
|
|
||||||
|
|
||||||
%global _description \
|
%global _description \
|
||||||
The pytest framework makes it easy to write small tests,\
|
The pytest framework makes it easy to write small tests,\
|
||||||
@ -34,67 +24,87 @@ applications and libraries.
|
|||||||
%description
|
%description
|
||||||
%{_description}
|
%{_description}
|
||||||
|
|
||||||
%package -n python3-pytest
|
%package -n python3-%{name}
|
||||||
Summary: pytest: simple powerful testing with Python
|
Summary: %{summary}
|
||||||
Provides: python-pytest
|
BuildRequires: python3-atomicwrites python3-attrs python3-devel python3-hypothesis
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-more-itertools python3-pluggy python3-py >= %{pylib_version}
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools python3-setuptools_scm python3-six
|
||||||
BuildRequires: python3-setuptools_scm
|
Requires: python3-atomicwrites python3-attrs python3-more-itertools
|
||||||
%description -n python3-pytest
|
Requires: python3-pluggy python3-py >= %{pylib_version}
|
||||||
|
Requires: python3-setuptools python3-six
|
||||||
|
|
||||||
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
|
Obsoletes: platform-python-%{name} < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-%{name}
|
||||||
%{_description}
|
%{_description}
|
||||||
|
|
||||||
%package help
|
%if 0%{?with_help}
|
||||||
Summary: Development documents and examples for pytest
|
%package_help
|
||||||
Provides: python3-pytest-doc
|
%endif
|
||||||
%description help
|
|
||||||
%{_description}
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n pytest-6.0.2
|
%autosetup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
%if 0%{?with_help}
|
||||||
|
for f in README CHANGELOG CONTRIBUTING ; do
|
||||||
|
rst2html ${f}.rst > ${f}.html
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
for file in pytest py.test; do
|
||||||
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
mv $RPM_BUILD_ROOT%{_bindir}/${file} $RPM_BUILD_ROOT%{_bindir}/${file}-%{python3_version}
|
||||||
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
ln -snf ${file}-%{python3_version} $RPM_BUILD_ROOT%{_bindir}/${file}-3
|
||||||
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
|
done
|
||||||
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-pytest -f filelist.lst
|
for file in pytest py.test; do
|
||||||
%dir %{python3_sitelib}/*
|
ln -snf ${file}-%{python2_version} $RPM_BUILD_ROOT%{_bindir}/${file}
|
||||||
|
done
|
||||||
|
|
||||||
%files help -f doclist.lst
|
%if 0%{?with_help}
|
||||||
%{_pkgdocdir}
|
install -d _htmldocs/html
|
||||||
|
%endif
|
||||||
|
|
||||||
|
find $RPM_BUILD_ROOT{%{python2_sitelib},%{python3_sitelib}} \
|
||||||
|
-name '*.py' \
|
||||||
|
-exec sed -i -e '1{/^#!/d}' {} \;
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with tests}
|
||||||
|
PATH=$RPM_BUILD_ROOT%{_bindir}:${PATH} \
|
||||||
|
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} \
|
||||||
|
$RPM_BUILD_ROOT%{_bindir}/pytest-%{python3_version} -r s testing \
|
||||||
|
--timeout=30
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n python3-%{name}
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/pytest
|
||||||
|
%{_bindir}/py.test
|
||||||
|
%{_bindir}/pytest-3
|
||||||
|
%{_bindir}/pytest-%{python3_version}
|
||||||
|
%{_bindir}/py.test-3
|
||||||
|
%{_bindir}/py.test-%{python3_version}
|
||||||
|
%{python3_sitelib}/pytest-*.egg-info/
|
||||||
|
%{python3_sitelib}/_pytest/
|
||||||
|
%{python3_sitelib}/pytest.py
|
||||||
|
%{python3_sitelib}/__pycache__/pytest.*
|
||||||
|
|
||||||
|
%if 0%{?with_help}
|
||||||
|
%files help
|
||||||
|
%doc CHANGELOG.html README.html CONTRIBUTING.html _htmldocs/html
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Dec 9 2020 baizhonggui <baizhonggui@huawei.com> - 6.0.2-1
|
|
||||||
- Update to 6.0.2
|
|
||||||
|
|
||||||
* Mon Nov 2 2020 wutao <wutao61@huawei.com> - 3.6.4-4
|
* Mon Nov 2 2020 wutao <wutao61@huawei.com> - 3.6.4-4
|
||||||
- disable python2
|
- disable python2
|
||||||
|
|
||||||
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 3.6.4-2
|
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 3.6.4-2
|
||||||
- Package init
|
- Package init
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user