# # spec file for package python-pydocstyle # # 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 https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-pydocstyle Version: 2.1.1 Release: 0 Summary: Python docstring style checker License: MIT Group: Development/Languages/Python Url: https://github.com/PyCQA/pydocstyle/ Source: https://files.pythonhosted.org/packages/source/p/pydocstyle/pydocstyle-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros %if %{with test} BuildRequires: %{python_module six} BuildRequires: %{python_module snowballstemmer} BuildRequires: python-configparser %endif BuildRequires: fdupes Requires: python-six Requires: python-snowballstemmer %ifpython2 Requires: python-configparser %endif Provides: python-pep257 = %{version} Obsoletes: python-pep257 < %{version} BuildArch: noarch %python_subpackages %description pydocstyle is a static analysis tool for checking compliance with Python docstring conventions. pydocstyle supports most of PEP 257 out of the box, but it should not be considered a reference implementation. The framework for checking docstring style is flexible, and custom checks can be easily added, for example to cover NumPy docstring conventions. %prep %setup -q -n pydocstyle-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check mkdir empty pushd empty %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} $python -c "import pydocstyle" $python -c "from pydocstyle import *" } popd %files %{python_files} %defattr(-,root,root,-) %doc README.rst %license LICENSE-MIT %python3_only %{_bindir}/pydocstyle %{python_sitelib}/* %changelog