diff --git a/python-scripttester.rpmlintrc b/python-scripttester.rpmlintrc new file mode 100644 index 0000000..4454dd1 --- /dev/null +++ b/python-scripttester.rpmlintrc @@ -0,0 +1,5 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# The dictionary lacks some technical words +addFilter(r'spelling-error .* (entrypoint|mymodule|subdirectory)') diff --git a/python-scripttester.spec b/python-scripttester.spec index 7097b8a..1a8a8da 100644 --- a/python-scripttester.spec +++ b/python-scripttester.spec @@ -11,22 +11,23 @@ Source0: https://github.com/matthew-brett/scripttester/archive/%{version} BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3dist(docutils) BuildRequires: python3dist(pytest) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(sphinx) -%global desc \ -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. +%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} @@ -36,10 +37,6 @@ Summary: Utility for testing command line scripts %{?python_provide:%python_provide python3-%{srcname}} -# This can be removed when F29 reaches EOL -Obsoletes: python2-%{srcname} < 0.1-2 -Provides: python2-%{srcname} = %{version}-%{release} - %description -n python3-%{srcname} %{desc} @@ -48,9 +45,10 @@ Provides: python2-%{srcname} = %{version}-%{release} %build %py3_build +rst2html --no-datestamp README.rst README.html # Documentation build -sed -i 's/python -msphinx/sphinx-build-%{python3_version}/' doc/Makefile +sed -i 's/python -msphinx/sphinx-build/' doc/Makefile make -C doc html rm -f doc/_build/html/.{buildinfo,nojekyll} @@ -63,7 +61,7 @@ pytest-%{python3_version} %files -n python3-%{srcname} %license LICENSE -%doc README.rst doc/_build/html +%doc README.html doc/_build/html %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}*.egg-info/