diff --git a/pytest-3.6.4.tar.gz b/pytest-3.6.4.tar.gz deleted file mode 100644 index fa611a7..0000000 Binary files a/pytest-3.6.4.tar.gz and /dev/null differ diff --git a/pytest-5.4.3.tar.gz b/pytest-5.4.3.tar.gz new file mode 100644 index 0000000..2bab9ad Binary files /dev/null and b/pytest-5.4.3.tar.gz differ diff --git a/pytest.spec b/pytest.spec index ef03b68..7968d7e 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,56 +1,76 @@ -# the testsuite is curremtly not fully compatible with python3 -%bcond_with tests - -%global pylib_version 1.5.0 -%global with_help 1 - Name: pytest -Version: 3.6.4 -Release: 4 -Summary: A mature full-featured Python testing tool +Version: 5.4.3 +Release: 1 +Summary: Simple powerful testing with Python License: MIT -URL: http://pytest.org -Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz -BuildArch: noarch -%if 0%{?with_help} -BuildRequires: %{_bindir}/sphinx-build-3 %{_bindir}/rst2html +URL: https://pytest.org +Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-5.4.3.tar.gz + +%bcond_with tests +%bcond_with optional_tests +%bcond_without docs + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-attrs +BuildRequires: python3-more-itertools +BuildRequires: python3-packaging +BuildRequires: python3-pluggy >= 0.12 +BuildRequires: python3-py >= 1.5.0 +BuildRequires: python3-wcwidth + +%if %{with tests} +BuildRequires: python3-hypothesis +BuildRequires: python3-xmlschema +%if %{with optional_tests} +BuildRequires: python3-argcomplete +BuildRequires: python3-decorator +BuildRequires: python3-jinja2 +BuildRequires: python3-mock +BuildRequires: python3-nose +BuildRequires: python3-numpy +BuildRequires: python3-pexpect +BuildRequires: python3-pytest-xdist +BuildRequires: python3-twisted +%endif +%if %{with timeout} +BuildRequires: python3-pytest-timeout +%endif %endif -%global _description \ -The pytest framework makes it easy to write small tests,\ -yet scales to support complex functional testing for\ -applications and libraries. +%if %{with docs} +BuildRequires: %{_bindir}/rst2html +BuildRequires: make +%endif + +BuildArch: noarch %description -%{_description} +py.test provides simple, yet powerful testing for Python. + %package -n python3-%{name} -Summary: %{summary} -BuildRequires: python3-atomicwrites python3-attrs python3-devel python3-hypothesis -BuildRequires: python3-more-itertools python3-pluggy python3-py >= %{pylib_version} -BuildRequires: python3-setuptools python3-setuptools_scm python3-six -Requires: python3-atomicwrites python3-attrs python3-more-itertools -Requires: python3-pluggy python3-py >= %{pylib_version} -Requires: python3-setuptools python3-six - +Summary: Simple powerful testing with Python %{?python_provide:%python_provide python3-%{name}} -Obsoletes: platform-python-%{name} < %{version}-%{release} +Provides: pytest = %{version}-%{release} +Conflicts: python-pytest < 4.6 %description -n python3-%{name} -%{_description} - -%if 0%{?with_help} -%package_help -%endif +py.test provides simple, yet powerful testing for Python. +%package help +Summary: Help documents for pytest +%description help +Help documents for pytest. %prep -%autosetup +%autosetup -p1 %build %py3_build -%if 0%{?with_help} +%if %{with docs} for f in README CHANGELOG CONTRIBUTING ; do rst2html ${f}.rst > ${f}.html done @@ -58,52 +78,54 @@ done %install %py3_install -for file in pytest py.test; do -mv $RPM_BUILD_ROOT%{_bindir}/${file} $RPM_BUILD_ROOT%{_bindir}/${file}-%{python3_version} -ln -snf ${file}-%{python3_version} $RPM_BUILD_ROOT%{_bindir}/${file}-3 -done +mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version} +ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest-3 +mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version} +ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3 -for file in pytest py.test; do -ln -snf ${file}-%{python2_version} $RPM_BUILD_ROOT%{_bindir}/${file} -done +ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest +ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test -%if 0%{?with_help} -install -d _htmldocs/html +%if %{with docs} + mkdir -p _htmldocs/html %endif -find $RPM_BUILD_ROOT{%{python2_sitelib},%{python3_sitelib}} \ +find %{buildroot}%{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 \ +%check +PYTHONDONTWRITEBYTECODE=1 \ +PATH=%{buildroot}%{_bindir}:${PATH} \ +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + %{buildroot}%{_bindir}/pytest-%{python3_version} -r s testing \ + %if %{with timeout} --timeout=30 + %endif %endif %files -n python3-%{name} %license LICENSE %{_bindir}/pytest -%{_bindir}/py.test %{_bindir}/pytest-3 %{_bindir}/pytest-%{python3_version} +%{_bindir}/py.test %{_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.* +%{python3_sitelib}/pytest/ -%if 0%{?with_help} %files help %doc CHANGELOG.html README.html CONTRIBUTING.html _htmldocs/html -%endif %changelog +* Fri Jan 9 2021 wutao - 5.4.3-1 +- Update to 5.4.3 + * Mon Nov 2 2020 wutao - 3.6.4-4 -- disable python2 +- disable python2 * Tue Dec 10 2019 mengxian - 3.6.4-2 - Package init