python-FormEncode/python-FormEncode.spec

79 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-FormEncode
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-FormEncode
Version: 2.1.0
Release: 0
Summary: HTML form validation, generation, and conversion package
License: Python-2.0
Group: Development/Languages/Python
URL: https://formencode.org
Source: https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.tar.gz
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pycountry}
BuildRequires: %{python_module pytest}
Accepting request 942383 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 * Add support for 3.10 * use Pytest instead of Nose and Github Actions instead of Travis for tests * Documentation updates * Note this will be the last version to support Python 2.7. The next version will be 2.1 to signal this change. If you want to keep support for Python 2.7 update your dependencies spec to be below 2.1 - Release 2.0.0 * FormEncode can now run on Python 3.6 and higher without needing to run 2to3 first. * FormEncode 2.0 is no longer compatible with Python 2.6 and 3.2 to 3.5. If you need Python 2.6 or 3.2 to 3.5 compatibility please use FormEncode 1.3. You might also try FormEncode 2.0.0a1 which supports Python 2.6 and Python 3.3-3.5. * This will be the last major version to support Python 2.7 * Add strict flag to USPostalCode to raise error on postal codes that has too many digits instead of just truncating * Various Python 3 fixes * Serbian latin translation * Changed License to MIT * Dutch, UK, Greek and South Korean postal code format fixes * Add postal code formats for Switzerland, Cyprus, Faroe Islands, San Marino, Ukraine and Vatican City. * Add ISODateTimeConverter validator * Add ability to target htmlfill to particular form or ignore a form * Fix format errors in some translations * The version of the library can be checked using OBS-URL: https://build.opensuse.org/request/show/942383 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=26
2021-12-28 11:54:49 +00:00
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six
BuildArch: noarch
%python_subpackages
%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
%setup -q -n FormEncode-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
Accepting request 942383 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 * Add support for 3.10 * use Pytest instead of Nose and Github Actions instead of Travis for tests * Documentation updates * Note this will be the last version to support Python 2.7. The next version will be 2.1 to signal this change. If you want to keep support for Python 2.7 update your dependencies spec to be below 2.1 - Release 2.0.0 * FormEncode can now run on Python 3.6 and higher without needing to run 2to3 first. * FormEncode 2.0 is no longer compatible with Python 2.6 and 3.2 to 3.5. If you need Python 2.6 or 3.2 to 3.5 compatibility please use FormEncode 1.3. You might also try FormEncode 2.0.0a1 which supports Python 2.6 and Python 3.3-3.5. * This will be the last major version to support Python 2.7 * Add strict flag to USPostalCode to raise error on postal codes that has too many digits instead of just truncating * Various Python 3 fixes * Serbian latin translation * Changed License to MIT * Dutch, UK, Greek and South Korean postal code format fixes * Add postal code formats for Switzerland, Cyprus, Faroe Islands, San Marino, Ukraine and Vatican City. * Add ISODateTimeConverter validator * Add ability to target htmlfill to particular form or ignore a form * Fix format errors in some translations * The version of the library can be checked using OBS-URL: https://build.opensuse.org/request/show/942383 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=26
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}
# remove misplaced documentation
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
# excluded tests poll dns
Accepting request 942383 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 * Add support for 3.10 * use Pytest instead of Nose and Github Actions instead of Travis for tests * Documentation updates * Note this will be the last version to support Python 2.7. The next version will be 2.1 to signal this change. If you want to keep support for Python 2.7 update your dependencies spec to be below 2.1 - Release 2.0.0 * FormEncode can now run on Python 3.6 and higher without needing to run 2to3 first. * FormEncode 2.0 is no longer compatible with Python 2.6 and 3.2 to 3.5. If you need Python 2.6 or 3.2 to 3.5 compatibility please use FormEncode 1.3. You might also try FormEncode 2.0.0a1 which supports Python 2.6 and Python 3.3-3.5. * This will be the last major version to support Python 2.7 * Add strict flag to USPostalCode to raise error on postal codes that has too many digits instead of just truncating * Various Python 3 fixes * Serbian latin translation * Changed License to MIT * Dutch, UK, Greek and South Korean postal code format fixes * Add postal code formats for Switzerland, Cyprus, Faroe Islands, San Marino, Ukraine and Vatican City. * Add ISODateTimeConverter validator * Add ability to target htmlfill to particular form or ignore a form * Fix format errors in some translations * The version of the library can be checked using OBS-URL: https://build.opensuse.org/request/show/942383 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=26
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}
Accepting request 942383 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 * Add support for 3.10 * use Pytest instead of Nose and Github Actions instead of Travis for tests * Documentation updates * Note this will be the last version to support Python 2.7. The next version will be 2.1 to signal this change. If you want to keep support for Python 2.7 update your dependencies spec to be below 2.1 - Release 2.0.0 * FormEncode can now run on Python 3.6 and higher without needing to run 2to3 first. * FormEncode 2.0 is no longer compatible with Python 2.6 and 3.2 to 3.5. If you need Python 2.6 or 3.2 to 3.5 compatibility please use FormEncode 1.3. You might also try FormEncode 2.0.0a1 which supports Python 2.6 and Python 3.3-3.5. * This will be the last major version to support Python 2.7 * Add strict flag to USPostalCode to raise error on postal codes that has too many digits instead of just truncating * Various Python 3 fixes * Serbian latin translation * Changed License to MIT * Dutch, UK, Greek and South Korean postal code format fixes * Add postal code formats for Switzerland, Cyprus, Faroe Islands, San Marino, Ukraine and Vatican City. * Add ISODateTimeConverter validator * Add ability to target htmlfill to particular form or ignore a form * Fix format errors in some translations * The version of the library can be checked using OBS-URL: https://build.opensuse.org/request/show/942383 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=26
2021-12-28 11:54:49 +00:00
%files %{python_files} -f %{python_prefix}-FormEncode.lang
%license LICENSE.txt
%doc README.rst
Accepting request 942383 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 * Add support for 3.10 * use Pytest instead of Nose and Github Actions instead of Travis for tests * Documentation updates * Note this will be the last version to support Python 2.7. The next version will be 2.1 to signal this change. If you want to keep support for Python 2.7 update your dependencies spec to be below 2.1 - Release 2.0.0 * FormEncode can now run on Python 3.6 and higher without needing to run 2to3 first. * FormEncode 2.0 is no longer compatible with Python 2.6 and 3.2 to 3.5. If you need Python 2.6 or 3.2 to 3.5 compatibility please use FormEncode 1.3. You might also try FormEncode 2.0.0a1 which supports Python 2.6 and Python 3.3-3.5. * This will be the last major version to support Python 2.7 * Add strict flag to USPostalCode to raise error on postal codes that has too many digits instead of just truncating * Various Python 3 fixes * Serbian latin translation * Changed License to MIT * Dutch, UK, Greek and South Korean postal code format fixes * Add postal code formats for Switzerland, Cyprus, Faroe Islands, San Marino, Ukraine and Vatican City. * Add ISODateTimeConverter validator * Add ability to target htmlfill to particular form or ignore a form * Fix format errors in some translations * The version of the library can be checked using OBS-URL: https://build.opensuse.org/request/show/942383 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=26
2021-12-28 11:54:49 +00:00
%{python_sitelib}/formencode
%{python_sitelib}/FormEncode-%{version}*-info
%changelog