forked from pool/python-WTForms
- Don't let description assume any particular user. OBS-URL: https://build.opensuse.org/request/show/520360 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WTForms?expand=0&rev=10
113 lines
3.6 KiB
RPMSpec
113 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package python-WTForms
|
|
#
|
|
# Copyright (c) 2017 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-%{**}}
|
|
%bcond_with test
|
|
Name: python-WTForms
|
|
Version: 2.1
|
|
Release: 0
|
|
Summary: A flexible forms validation and rendering library for Python web development
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
Url: http://wtforms.simplecodes.com/
|
|
Source: https://files.pythonhosted.org/packages/source/W/WTForms/WTForms-%{version}.zip
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
%if %{with test}
|
|
BuildRequires: python3-Babel
|
|
BuildRequires: python3-Django
|
|
BuildRequires: python3-SQLAlchemy
|
|
BuildRequires: python3-python-dateutil
|
|
%endif
|
|
Recommends: python-Babel
|
|
Recommends: python-Django
|
|
Recommends: python-SQLAlchemy
|
|
Recommends: python-python-dateutil
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
WTForms is a forms validation and rendering library for Python web development.
|
|
With WTForms, form field HTML can be generated and be customized with templates.
|
|
This allows to maintain separation of code and presentation, and keep those parameters out of Python code.
|
|
Because of this loose coupling, any template engine may be used for this.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: Documentation for WTForms
|
|
Group: Documentation/HTML
|
|
Requires: %{name} = %{version}
|
|
|
|
%description -n %{name}-doc
|
|
Documentation for WTForms, which is a forms validation and rendering library for Python web development.
|
|
|
|
%package lang
|
|
Summary: Languages for package %{name}
|
|
Group: System/Localization
|
|
Requires: %{name} = %{version}
|
|
Supplements: packageand(bundle-lang-other:%{name})
|
|
Provides: %{name}-lang-all = %{version}
|
|
|
|
%description lang
|
|
Provides translations to the package %{name}
|
|
|
|
%prep
|
|
%setup -q -n WTForms-%{version}
|
|
sed -i "s/\r//" CHANGES.rst docs/html/_static/jquery.js # Fix wrong EOL-encoding
|
|
rm -rf docs/html/.buildinfo # Remove junk
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%find_lang wtforms
|
|
%python_expand grep -F "%{$python_sitelib}" wtforms.lang > wtforms_%{$python_bin_suffix}.lang
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%if %{with test}
|
|
%check
|
|
%python_exec setup.py test
|
|
%endif
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
|
|
%{python_sitelib}/*
|
|
%exclude %{python_sitelib}/wtforms/locale
|
|
|
|
%files -n %{name}-doc
|
|
%defattr(-,root,root,-)
|
|
%doc docs/html
|
|
|
|
%if %have_python2 && ! 0%{?skip_python2}
|
|
%files -n %{python2_prefix}-WTForms-lang -f wtforms_%{python2_bin_suffix}.lang
|
|
%defattr(-,root,root,-)
|
|
%{python2_sitelib}/wtforms/locale
|
|
%endif
|
|
|
|
%if %have_python2 && ! 0%{?skip_python3}
|
|
%files -n %{python3_prefix}-WTForms-lang -f wtforms_%{python3_bin_suffix}.lang
|
|
%defattr(-,root,root,-)
|
|
%{python3_sitelib}/wtforms/locale
|
|
%endif
|
|
|
|
%changelog
|