# # spec file for package python-HTTPolice # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-HTTPolice Version: 0.7.0 Release: 0 License: MIT Summary: Validator for HTTP Url: https://github.com/vfaronov/httpolice Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/H/HTTPolice/HTTPolice-%{version}.tar.gz Patch0: https://github.com/vfaronov/httpolice/commit/4da2bde.patch#/py34-no-singledispatch.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: %{python_module bitstring >= 3.1.4} BuildRequires: %{python_module brotlipy >= 0.5.1} BuildRequires: %{python_module defusedxml >= 0.5.0} BuildRequires: %{python_module dominate >= 2.2.0} BuildRequires: %{python_module lxml >= 3.6.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: python2-singledispatch >= 3.4.0.3 BuildRequires: python-enum34 >= 1.1.6 Requires: python-bitstring >= 3.1.4 Requires: python-brotlipy >= 0.5.1 Requires: python-defusedxml >= 0.5.0 Requires: python-dominate >= 2.2.0 Requires: python-lxml >= 3.6.0 Requires: python-six >= 1.10.0 %ifpython2 Requires: python-enum34 >= 1.1.6 Requires: python-singledispatch >= 3.4.0.3 %endif BuildArch: noarch %python_subpackages %description HTTPolice is a validator or linter for HTTP requests and responses. It can spot bad header syntax, inappropriate status codes, and other potential problems in your HTTP server or client. %prep %setup -q -n HTTPolice-%{version} %patch0 -p1 %build export LANG=en_US.UTF-8 %python_build %install export LANG=en_US.UTF-8 %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.UTF-8 %python_exec -m pytest -o addopts=-v %files %{python_files} %license LICENSE.txt %doc CHANGELOG.rst README.rst %python3_only %{_bindir}/httpolice %{python_sitelib}/* %changelog