Blame python-test_server.spec

0f0136f
%bcond_without doc
0f0136f
0f0136f
%global modname test_server
0f0136f
0f0136f
Name:           python-%{modname}
0f0136f
Version:        0.0.31
03c4799
Release:        3%{?dist}
0f0136f
Summary:        Server to test HTTP clients, written in Python
0f0136f
0f0136f
License:        MIT
0f0136f
URL:            https://github.com/lorien/%{modname}
0f0136f
Source0:        %{url}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
33d225d
# https://github.com/Anorov/PySocks/issues/117
33d225d
Patch0:         %{modname}-deprecated-params.patch
0f0136f
BuildArch:      noarch
0f0136f
0f0136f
BuildRequires:  python3-devel
0f0136f
BuildRequires:  python3-setuptools
0f0136f
BuildRequires:  python3-bottle
0f0136f
BuildRequires:  python3-webtest
0f0136f
0f0136f
%if %{with doc}
0f0136f
BuildRequires:  python3-sphinx
0f0136f
%endif
0f0136f
0f0136f
# Tests:
0f0136f
BuildRequires:  python3-pytest
0f0136f
0f0136f
%?python_enable_dependency_generator
0f0136f
0f0136f
%description
0f0136f
%{summary}.
0f0136f
0f0136f
%package -n     python3-%{modname}
0f0136f
Summary:        %{summary}
0f0136f
%{?python_provide:%python_provide python3-%{modname}}
0f0136f
0f0136f
%description -n python3-%{modname}
0f0136f
%{summary}.
0f0136f
0f0136f
%package        doc
0f0136f
Summary:        Documentation files for %{modname}
0f0136f
0f0136f
%description    doc
0f0136f
%{summary}.
0f0136f
0f0136f
0f0136f
%prep
33d225d
%autosetup -p1 -n%{modname}-%{version}
0f0136f
0f0136f
%build
0f0136f
%py3_build
0f0136f
0f0136f
%if %{with doc}
0f0136f
# avoid WARNING: autodoc: failed to import module
0f0136f
echo "import sys; import os; sys.path.insert(0, os.path.abspath('..'))" >>docs/conf.py
0f0136f
# FIXME several other warnings from sphinx
0f0136f
# FIXME drop binary suffix in case python3 gets the default runtime
0f0136f
sphinx-build-3 -d docs/doctrees docs docs/html
0f0136f
rm -fv docs/html/.build*
0f0136f
%endif
0f0136f
0f0136f
%install
0f0136f
%py3_install
0f0136f
0f0136f
%check
0f0136f
%{__python3} -m pytest -v
0f0136f
0f0136f
0f0136f
%files -n python3-%{modname}
0f0136f
%license LICENSE
0f0136f
%doc README.rst CHANGELOG.md
0f0136f
%{python3_sitelib}/%{modname}/
0f0136f
%{python3_sitelib}/%{modname}-%{version}-py%{python3_version}.egg-info/
0f0136f
0f0136f
%if %{with doc}
0f0136f
%files doc
0f0136f
%license LICENSE
0f0136f
%doc docs/html
0f0136f
%endif
0f0136f
0f0136f
0f0136f
%changelog
33d225d
* Thu Nov 01 2018 Raphael Groner <projects.rg@smart.ms> - 0.0.31-3
03c4799
- support old API for pysocks
33d225d
0f0136f
* Sat Oct 06 2018 Raphael Groner <projects.rg@smart.ms> - 0.0.31-2
0f0136f
- replace python3 version macro with concrete value, currently no plan for epel7
0f0136f
- use binary suffix for sphinx due to weird error with mock
0f0136f
0f0136f
* Wed Oct 03 2018 Raphael Groner <projects.rg@smart.ms> - 0.0.31-1
0f0136f
- prepare for review
0f0136f
- add optional generation of documentation into subpackage
0f0136f
- don't use pypi tarball due to missing docs subfolder
0f0136f
- skip epel7 for now due to missing runtime e.g. bottle and webtest
0f0136f
0f0136f
* Fri Aug 17 2018 Miro HronĨok <mhroncok@redhat.com> - 0.0.31-0
0f0136f
- Initial package