2011-09-01 08:46:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-FormEncode
|
|
|
|
#
|
2023-04-21 15:06:51 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-09-01 08:46:49 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2013-06-13 08:56:46 +00:00
|
|
|
|
2018-12-04 13:28:22 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-01 08:46:49 +00:00
|
|
|
#
|
|
|
|
|
2013-06-13 08:56:46 +00:00
|
|
|
|
2023-04-21 15:06:51 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2011-09-01 08:46:49 +00:00
|
|
|
Name: python-FormEncode
|
2023-12-16 21:00:57 +00:00
|
|
|
Version: 2.1.0
|
2011-09-01 08:46:49 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: HTML form validation, generation, and conversion package
|
2012-03-14 13:44:41 +00:00
|
|
|
License: Python-2.0
|
2011-09-01 08:46:49 +00:00
|
|
|
Group: Development/Languages/Python
|
2023-12-16 21:00:57 +00:00
|
|
|
URL: https://formencode.org
|
2019-03-04 16:26:44 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.tar.gz
|
2019-03-07 11:09:56 +00:00
|
|
|
BuildRequires: %{python_module dnspython}
|
2023-07-18 02:48:21 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-03-04 16:26:44 +00:00
|
|
|
BuildRequires: %{python_module pycountry}
|
2020-07-10 13:55:31 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-12-28 11:54:49 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2017-09-05 11:55:26 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-03-07 11:09:56 +00:00
|
|
|
BuildRequires: %{python_module six}
|
2023-07-18 02:48:21 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2015-05-07 11:54:26 +00:00
|
|
|
BuildRequires: fdupes
|
2017-09-05 11:55:26 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-07 11:09:56 +00:00
|
|
|
Requires: python-six
|
2012-03-14 13:44:41 +00:00
|
|
|
BuildArch: noarch
|
2017-09-05 11:55:26 +00:00
|
|
|
%python_subpackages
|
2011-09-01 08:46:49 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
FormEncode validates and converts nested structures. It allows for
|
|
|
|
a declarative form of defining the validation, and decoupled processes
|
|
|
|
for filling and generating forms.
|
|
|
|
|
|
|
|
%prep
|
2019-03-04 16:26:44 +00:00
|
|
|
%setup -q -n FormEncode-%{version}
|
2011-09-01 08:46:49 +00:00
|
|
|
|
|
|
|
%build
|
2023-07-18 02:48:21 +00:00
|
|
|
%pyproject_wheel
|
2011-09-01 08:46:49 +00:00
|
|
|
|
|
|
|
%install
|
2023-07-18 02:48:21 +00:00
|
|
|
%pyproject_install
|
2021-12-28 11:54:49 +00:00
|
|
|
# trick find-lang.sh into finding the translation files
|
|
|
|
%python_expand mv %{buildroot}%{$python_sitelib}/formencode/{i18n,locale}
|
|
|
|
%python_find_lang FormEncode
|
|
|
|
sed -i s/locale/i18n/ python*-FormEncode.lang
|
|
|
|
%python_expand mv %{buildroot}%{$python_sitelib}/formencode/{locale,i18n}
|
2019-03-04 16:26:44 +00:00
|
|
|
# remove misplaced documentation
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
# excluded tests poll dns
|
2021-12-28 11:54:49 +00:00
|
|
|
donttest="(test_doctests and _wrapper-formencode.validators-False-True)"
|
|
|
|
donttest+=" or test_unicode_ascii_subgroup"
|
|
|
|
# 15.3 cannot fulfill test suite requirements with old versions; don't test on python2
|
|
|
|
python2_flags="--version"
|
|
|
|
%pytest -k "not ($donttest)" ${$python_flags}
|
2011-09-01 08:46:49 +00:00
|
|
|
|
2021-12-28 11:54:49 +00:00
|
|
|
%files %{python_files} -f %{python_prefix}-FormEncode.lang
|
|
|
|
%license LICENSE.txt
|
2017-09-07 15:45:01 +00:00
|
|
|
%doc README.rst
|
2021-12-28 11:54:49 +00:00
|
|
|
%{python_sitelib}/formencode
|
|
|
|
%{python_sitelib}/FormEncode-%{version}*-info
|
2011-09-01 08:46:49 +00:00
|
|
|
|
|
|
|
%changelog
|