python-discover/python-discover.spec
2021-11-05 14:37:45 +08:00

106 lines
3.8 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-discover
Version: 0.4.0
Release: 1
Summary: Test discovery for unittest. Backported from Python 2.7 for Python 2.4+
License: BSD
URL: http://pypi.python.org/pypi/discover/
Source0: https://files.pythonhosted.org/packages/2d/89/28d437f7c96f4062860fed466d81e3d247c6a17aea687a0ecdb1aa30f2c3/discover-0.4.0.tar.gz
BuildArch: noarch
%description
This is the test discovery mechanism and load_tests protocol for unittest
backported from Python 2.7 to work with Python 2.4 or more recent (including
Python 3)
Test discovery is just part of what is new in unittest in
Python 2.7. All of the new features have been backported to run on Python
2.4-2.6, including test discovery. This is the unittest2 package
discover can be installed with pip or easy_install. After installing switch the current
directory to the top level directory of your project and run:
python -m discover
python discover.py
%package -n python3-discover
Summary: Test discovery for unittest. Backported from Python 2.7 for Python 2.4+
Provides: python-discover
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
%description -n python3-discover
This is the test discovery mechanism and load_tests protocol for unittest
backported from Python 2.7 to work with Python 2.4 or more recent (including
Python 3)
Test discovery is just part of what is new in unittest in
Python 2.7. All of the new features have been backported to run on Python
2.4-2.6, including test discovery. This is the unittest2 package
discover can be installed with pip or easy_install. After installing switch the current
directory to the top level directory of your project and run:
python -m discover
python discover.py
%package help
Summary: Test discovery for unittest. Backported from Python 2.7 for Python 2.4+
Provides: python3-discover-doc
%description help
This is the test discovery mechanism and load_tests protocol for unittest
backported from Python 2.7 to work with Python 2.4 or more recent (including
Python 3)
Test discovery is just part of what is new in unittest in
Python 2.7. All of the new features have been backported to run on Python
2.4-2.6, including test discovery. This is the unittest2 package
discover can be installed with pip or easy_install. After installing switch the current
directory to the top level directory of your project and run:
python -m discover
python discover.py
%prep
%autosetup -n discover-%{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-discover -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri Nov 05 2021 huxiujie <huxiujie1@huawei.com> - 0.4.0-1
- Init package python3-discover of version 0.4.0