diff --git a/python-scripttester.spec b/python-scripttester.spec new file mode 100644 index 0000000000000000000000000000000000000000..3ba0b8a3dc44f40ec92cca01f026ff227db0c7c8 --- /dev/null +++ b/python-scripttester.spec @@ -0,0 +1,67 @@ +%global srcname scripttester + +Name: python-%{srcname} +Version: 0.1 +Release: 1 +Summary: Utility for testing command line scripts + +License: BSD +URL: https://pypi.org/project/scripttester/ +Source0: https://github.com/matthew-brett/scripttester/archive/%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: python3-devel +BuildRequires: %{py3_dist docutils} +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist sphinx} + +%global desc %{expand: +Provides a class to be instantiated in tests that checks that scripts +can be run and give correct output. The class tries to find your +scripts whether you have installed them or not. If you have not +installed them, the scripts will not be on your system PATH, and we have +to find them. The heuristic is to look (by default) in the directory +containing mymodule; if there is a setup.py file there, and a scripts +subdirectory, assume that directory contains the scripts. + +Note there is no way of using this not-installed mechanism to find +entrypoint scripts, that have not been installed. To find these, we +would have to run the setup.py file.} + +%description %{desc} + +%package -n python3-%{srcname} +Summary: Utility for testing command line scripts + +%description -n python3-%{srcname} %{desc} + +%prep +%autosetup -n %{srcname}-%{version} + +%build +%py3_build +rst2html --no-datestamp README.rst README.html + +# Documentation build +sed -i 's/python -msphinx/sphinx-build/' doc/Makefile +make -C doc html +rm -f doc/_build/html/.{buildinfo,nojekyll} + +%install +%py3_install + +%check +export PYTHONPATH=$PWD/build/lib +pytest-%{python3_version} + +%files -n python3-%{srcname} +%license LICENSE +%doc README.html doc/_build/html +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}*.egg-info/ + +%changelog +* Thu Jul 08 2021 wanglixing -0.1-1 +- init project diff --git a/scripttester-0.1.tar.gz b/scripttester-0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a85d07e2140c1384204fbaad465b207e7af743fe Binary files /dev/null and b/scripttester-0.1.tar.gz differ