python-pytest-virtualenv/python-pytest-virtualenv.spec

109 lines
3.2 KiB
RPMSpec
Raw Normal View History

2022-11-28 17:08:33 +08:00
%global _empty_manifest_terminate_build 0
%bcond_without tests
Name: python-pytest-virtualenv
Version: 1.7.0
Release: 2
2022-11-28 17:08:33 +08:00
Summary: Virtualenv fixture for py.test
License: MIT
URL: https://github.com/manahl/pytest-plugins
Source0: https://files.pythonhosted.org/packages/96/73/f3d34462e1d2de89bab407ba3dac5212e9e6996f5b4bc3c6930c68f51b62/pytest-virtualenv-1.7.0.tar.gz
BuildArch: noarch
2020-01-10 10:04:54 +08:00
%description
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.
%package -n python3-pytest-virtualenv
2022-11-28 17:08:33 +08:00
Summary: Virtualenv fixture for py.test
Provides: python-pytest-virtualenv = %{version}-%{release}
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-six
BuildRequires: python3-setuptools_git
%if %{with tests}
BuildRequires: python3-pytest-shutil
BuildRequires: python3-pytest-fixture-config
BuildRequires: python3-path
BuildRequires: python3-execnet
BuildRequires: python3-mock
BuildRequires: python3-virtualenv
%endif
Requires: python3-pytest-fixture-config
Requires: python3-pytest-shutil
Requires: python3-pytest
Requires: python3-virtualenv
Requires: python3-mock
2020-01-10 10:04:54 +08:00
%description -n python3-pytest-virtualenv
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.
2022-11-28 17:08:33 +08:00
%package help
Summary: Development documents and examples for pytest-virtualenv
Provides: python3-pytest-virtualenv-doc
%description help
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.
2020-01-10 10:04:54 +08:00
%prep
2020-01-13 03:46:07 -05:00
%autosetup -n pytest-virtualenv-%{version}
2020-01-10 10:04:54 +08:00
%build
%py3_build
%install
%py3_install
2022-11-28 17:08:33 +08:00
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 .
2020-01-10 10:04:54 +08:00
2022-11-28 17:08:33 +08:00
%if %{with tests}
2020-01-10 10:04:54 +08:00
%check
%{__python3} setup.py test
%endif
2022-11-28 17:08:33 +08:00
%files -n python3-pytest-virtualenv -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
2020-01-10 10:04:54 +08:00
%doc README.md CHANGES.md
%changelog
* Mon Jul 31 2023 xu_ping <707078654@qq.com> - 1.7.0-2
- remove buildrequires python3-contextlib2
2022-11-28 17:08:33 +08:00
* Mon Nov 28 2022 wangjunqi <wangjunqi@kylinos.cn> - 1.7.0-1
- Update package to version 1.7.0
2022-06-09 10:20:49 +08:00
* Fri Sep 11 2020 wangyue<wangyue92@huawei.com> - 1.2.11-12
2020-09-11 16:11:21 +08:00
- Remove python2-pytest-virtualenv
2020-01-13 03:48:16 -05:00
* Mon Jan 13 2020 Senlin Xia<xiasenlin1@huawei.com> - 1.2.11-11
- Modify %prep
2020-01-10 10:04:54 +08:00
* Wed Jan 08 2020 gulining<gulining@huawei.com> - 1.2.11-10
- Pakcage init