summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-26 09:21:45 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-26 09:21:45 +0000
commit365f7181a12660feda6a974f4dd03ef47cddb499 (patch)
tree49ab8197e2266caebf24a4f0e1bc09d72dae4cf3
parent85e9fccbb3c60f7eb5a83332b19e3152219d7576 (diff)
-rw-r--r--.gitignore1
-rw-r--r--pytest.spec166
-rw-r--r--sources1
3 files changed, 168 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..7ee6700 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pytest-7.4.4.tar.gz
diff --git a/pytest.spec b/pytest.spec
new file mode 100644
index 0000000..b79d23c
--- /dev/null
+++ b/pytest.spec
@@ -0,0 +1,166 @@
+Name: pytest
+Version: 7.4.4
+Release: 1
+Summary: Simple powerful testing with Python
+License: MIT
+URL: https://pytest.org
+Source0: https://files.pythonhosted.org/packages/80/1f/9d8e98e4133ffb16c90f3b405c43e38d3abb715bb5d7a63a5a684f7e46a3/%{name}-%{version}.tar.gz
+
+%bcond_with tests
+%bcond_with optional_tests
+%bcond_without docs
+
+BuildRequires: python3-devel
+BuildRequires: python3-toml
+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
+BuildRequires: python3-docutils
+BuildRequires: python3-pip
+BuildRequires: python3-wheel
+Requires: python3-tomli
+%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
+
+%if %{with docs}
+BuildRequires: %{_bindir}/rst2html
+BuildRequires: make
+%endif
+
+Requires: python3-exceptiongroup
+
+BuildArch: noarch
+
+%description
+py.test provides simple, yet powerful testing for Python.
+
+
+%package -n python3-%{name}
+Summary: Simple powerful testing with Python
+%{?python_provide:%python_provide python3-%{name}}
+Provides: pytest = %{version}-%{release}
+Conflicts: python-pytest < 4.6
+
+%description -n python3-%{name}
+py.test provides simple, yet powerful testing for Python.
+
+%package help
+Summary: Help documents for pytest
+%description help
+Help documents for pytest.
+
+%prep
+%autosetup -p1
+
+%build
+%pyproject_build
+
+%if %{with docs}
+for f in README CHANGELOG CONTRIBUTING ; do
+ rst2html ${f}.rst > ${f}.html
+done
+%endif
+
+%install
+%pyproject_install
+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
+
+ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest
+ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test
+
+%if %{with docs}
+ mkdir -p _htmldocs/html
+%endif
+
+find %{buildroot}%{python3_sitelib} \
+ -name '*.py' \
+ -exec sed -i -e '1{/^#!/d}' {} \;
+
+%if %{with tests}
+%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}/pytest-3
+%{_bindir}/pytest-%{python3_version}
+%{_bindir}/py.test
+%{_bindir}/py.test-3
+%{_bindir}/py.test-%{python3_version}
+%{python3_sitelib}/_pytest/
+%{python3_sitelib}/pytest/
+%{python3_sitelib}/__pycache__/*.pyc
+%{python3_sitelib}/py.py
+%{python3_sitelib}/pytest-*.dist-info/
+
+%files help
+%doc CHANGELOG.html README.html CONTRIBUTING.html _htmldocs/html
+
+%changelog
+* Tue Mar 5 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 7.4.4-1
+- Update package with version 7.4.4
+ Fix non-string constants at the top of file being detected as docstrings on Python>=3.8.
+ Removed unhelpful error message from assertion rewrite mechanism
+ Updated documentation to refer to hyphenated options
+ Markers are now considered in the reverse mro order to ensure base class markers are considered first
+ Improved disclaimer on pytest plugin reference page to better indicate this is an automated
+ Added ExceptionInfo.from_exception() <pytest.ExceptionInfo.from_exception>
+
+* Wed Jul 19 2023 zhuofeng <zhuofeng2@huawei.com> - 7.3.2-2
+- Modify the file to adapt to the new Python version
+
+* Fri Jun 9 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 7.3.2-1
+- Upgrade package pytest to version 7.3.2
+
+* Tue Jul 12 2022 renliang16 <renliang@uniontech.com> - 7.0.1-1
+- Upgrade package pytest to version 7.0.1
+
+* Mon Dec 13 2021 shixuantong <shixuantong@huawei.com> - 6.2.5-1
+- update version to 6.2.5
+
+* Wed Aug 18 2021 huangtianhua <huangtianhua@huawei.com> - 6.2.2-2
+- Add python3-toml as BuildRequires to fix python dist version error
+
+* Mon Jul 19 2021 OpenStack_SIG <openstack@openeuler.org> - 6.2.2-1
+- update to 6.2.2
+
+* Mon Jan 11 2021 wutao <wutao61@huawei.com> - 5.4.3-1
+- Update to 5.4.3
+
+* Mon Nov 2 2020 wutao <wutao61@huawei.com> - 3.6.4-4
+- disable python2
+
+* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 3.6.4-2
+- Package init
diff --git a/sources b/sources
new file mode 100644
index 0000000..ec9fd42
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e2ac4c70861f26d735b64e5687bb218e pytest-7.4.4.tar.gz