diff --git a/pytest-datafiles-2.0.1.tar.gz b/pytest-datafiles-2.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ff2820ab8148795128b9839d844e076b332fb16d Binary files /dev/null and b/pytest-datafiles-2.0.1.tar.gz differ diff --git a/pytest-datafiles-2.0.tar.gz b/pytest-datafiles-2.0.tar.gz deleted file mode 100644 index 1b0bca97d2e7df3490ca6f3306743f21fd0a4de6..0000000000000000000000000000000000000000 Binary files a/pytest-datafiles-2.0.tar.gz and /dev/null differ diff --git a/python-pytest-datafiles.spec b/python-pytest-datafiles.spec index 529d6a0d3ee0d06de1978bd8dbbf903968761bca..ece66824995e0e0ef22abc317a3b09c72a32aa0d 100644 --- a/python-pytest-datafiles.spec +++ b/python-pytest-datafiles.spec @@ -1,60 +1,88 @@ -%global pypi_name pytest-datafiles - -Name: python-%{pypi_name} -Version: 2.0 +%global _empty_manifest_terminate_build 0 +Name: python-pytest-datafiles +Version: 2.0.1 Release: 1 Summary: py.test plugin to create a 'tmpdir' containing predefined files/directories - License: MIT URL: https://github.com/omarkohl/pytest-datafiles -Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/26/60/4e49c18caf0ba7b7222da47ea6143f4f1ea3993f043be7bdf4ae409e544d/pytest-datafiles-2.0.1.tar.gz BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3dist(py) -BuildRequires: python3dist(pytest) >= 3.6 -BuildRequires: python3dist(setuptools) - %description pytest plugin to create a tmpdir containing a preconfigured set of files and/or directories. This plugin allows you to specify one or several files/directories that are copied to a temporary directory (tmpdir) before the execution of the test. This means the original files are not modified and every test runs on its own version of the same files. -%package -n python3-%{pypi_name} -Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} -Requires: python3dist(py) -Requires: python3dist(pytest) >= 3.6 -Requires: python3dist(setuptools) -%description -n python3-%{pypi_name} +%package -n python3-pytest-datafiles +Summary: py.test plugin to create a 'tmpdir' containing predefined files/directories. +Provides: python-pytest-datafiles +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-py +BuildRequires: python3-pytest +%description -n python3-pytest-datafiles +pytest plugin to create a tmpdir containing a preconfigured set of files and/or directories. +This plugin allows you to specify one or several files/directories that are copied to a +temporary directory (tmpdir) before the execution of the test. This means the original files +are not modified and every test runs on its own version of the same files. + +%package help +Summary: Development documents and examples for pytest-datafiles +Provides: python3-pytest-datafiles-doc +%description help pytest plugin to create a tmpdir containing a preconfigured set of files and/or directories. This plugin allows you to specify one or several files/directories that are copied to a temporary directory (tmpdir) before the execution of the test. This means the original files are not modified and every test runs on its own version of the same files. %prep -%autosetup -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info +%autosetup -n pytest-datafiles-%{version} %build %py3_build %install %py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +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 . %check %{__python3} setup.py test -%files -n python3-%{pypi_name} -%license LICENSE -%doc README.rst -%{python3_sitelib}/__pycache__/* -%{python3_sitelib}/pytest_datafiles.py -%{python3_sitelib}/pytest_datafiles-%{version}-py%{python3_version}.egg-info +%files -n python3-pytest-datafiles -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Tue Nov 08 2022 liqiuyu - 2.0.1-1 +- Upgrade package to version 2.0.1 + * Tue Jun 29 2021 wangqing - 2.0-1 - Initial package.