[packages/python-FormEncode] - updated to 2.0.1; now uses six instead of no longer supported 2to3 setuptools option
qboosh
qboosh at pld-linux.org
Mon Sep 18 21:06:07 CEST 2023
commit f0cb4fcf9bce005a31ba98903889f4960f5a154b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Sep 18 20:53:25 2023 +0200
- updated to 2.0.1; now uses six instead of no longer supported 2to3 setuptools option
python-FormEncode-pycountry.patch | 27 --------------------------
python-FormEncode.spec | 41 +++++++++++++++++++++------------------
versions.patch | 12 ------------
3 files changed, 22 insertions(+), 58 deletions(-)
---
diff --git a/python-FormEncode.spec b/python-FormEncode.spec
index 2e8d9e3..fc97a1b 100644
--- a/python-FormEncode.spec
+++ b/python-FormEncode.spec
@@ -9,39 +9,44 @@
Summary: HTML form validation, generation, and convertion package
Summary(pl.UTF-8): Moduł do walidacji, tworzenia i konwersji formularzy HTML
Name: python-%{module}
-Version: 1.3.1
-Release: 5
+# keep 2.0.x here for python2 support
+Version: 2.0.1
+Release: 1
License: PSF
Group: Development/Languages/Python
#Source0Download: https://pypi.org/project/FormEncode/
Source0: https://files.pythonhosted.org/packages/source/F/FormEncode/%{module}-%{version}.tar.gz
-# Source0-md5: 16fbefb206064eb93a6719f054a19b3b
-Patch0: %{name}-pycountry.patch
-Patch1: versions.patch
+# Source0-md5: 65a9ba7220890c3d26904bdafe3a5a35
URL: http://formencode.org/
%if %{with python2}
-BuildRequires: python-modules >= 1:2.6
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+BuildRequires: python-setuptools_scm < 6
+BuildRequires: python-setuptools_scm_git_archive
%if %{with tests}
-BuildRequires: python-dns
-BuildRequires: python-nose
-BuildRequires: python-pycountry >= 16.10.23
+BuildRequires: python-dns = 1.16.0
+BuildRequires: python-pycountry < 19
+BuildRequires: python-pytest < 4.7
+BuildRequires: python-six
%endif
%endif
%if %{with python3}
-BuildRequires: python3-2to3 >= 1:3.2
-BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-2to3 >= 1:3.6
+BuildRequires: python3-modules >= 1:3.6
BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+BuildRequires: python3-setuptools_scm_git_archive
%if %{with tests}
-BuildRequires: python3-dns
-BuildRequires: python3-nose
+BuildRequires: python3-dns >= 2.0.0
BuildRequires: python3-pycountry >= 16.10.23
+BuildRequires: python3-pytest
+BuildRequires: python3-six
%endif
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
-Requires: python-modules >= 1:2.6
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -59,7 +64,7 @@ poprawności i niezależne od nich wypełnianie i generowanie formularzy.
Summary: HTML form validation, generation, and convertion package
Summary(pl.UTF-8): Moduł do walidacji, tworzenia i konwersji formularzy HTML
Group: Libraries/Python
-Requires: python3-modules >= 1:3.2
+Requires: python3-modules >= 1:3.6
%description -n python3-%{module}
FormEncode validates and converts nested structures. It allows for a
@@ -84,8 +89,6 @@ Dokumentacja API modułu Pythona FormEncode.
%prep
%setup -q -n %{module}-%{version}
-%patch0 -p1
-%patch1 -p1
# uses network to validate domains (with one no longer valid anyway)
%{__rm} formencode/tests/test_email.py
@@ -97,7 +100,7 @@ Dokumentacja API modułu Pythona FormEncode.
%py_build
%if %{with tests}
-%{__python} -m nose build-2/lib/formencode/tests
+%{__python} -m pytest build-2/lib/formencode/tests
%endif
%endif
@@ -105,7 +108,7 @@ Dokumentacja API modułu Pythona FormEncode.
%py3_build
%if %{with tests}
-%{__python3} -m nose build-3/lib/formencode/tests
+%{__python3} -m pytest build-3/lib/formencode/tests
%endif
%endif
diff --git a/python-FormEncode-pycountry.patch b/python-FormEncode-pycountry.patch
deleted file mode 100644
index ed8a9ea..0000000
--- a/python-FormEncode-pycountry.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- FormEncode-1.3.1/formencode/national.py.orig 2016-08-08 13:33:45.000000000 +0200
-+++ FormEncode-1.3.1/formencode/national.py 2020-06-09 06:40:30.941129354 +0200
-@@ -85,19 +85,19 @@
- _l = lambda t: gettext.dgettext('iso639', t)
-
- def get_countries():
-- c1 = set([(e.alpha2, _c(e.name)) for e in pycountry.countries])
-+ c1 = set([(e.alpha_2, _c(e.name)) for e in pycountry.countries])
- ret = c1.union(country_additions + fuzzy_countrynames)
- return ret
-
- def get_country(code):
-- return _c(pycountry.countries.get(alpha2=code).name)
-+ return _c(pycountry.countries.get(alpha_2=code).name)
-
- def get_languages():
-- return [(e.alpha2, _l(e.name)) for e in pycountry.languages
-- if e.name and getattr(e, 'alpha2', None)]
-+ return [(e.alpha_2, _l(e.name)) for e in pycountry.languages
-+ if e.name and getattr(e, 'alpha_2', None)]
-
- def get_language(code):
-- return _l(pycountry.languages.get(alpha2=code).name)
-+ return _l(pycountry.languages.get(alpha_2=code).name)
-
-
- ############################################################
diff --git a/versions.patch b/versions.patch
deleted file mode 100644
index e77d2a4..0000000
--- a/versions.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- FormEncode-1.3.1/setup.py~ 2016-08-09 04:14:05.000000000 +0200
-+++ FormEncode-1.3.1/setup.py 2022-04-08 23:45:49.466208656 +0200
-@@ -11,9 +11,6 @@
-
- version = '1.3.1'
-
--if not '2.6' <= sys.version < '3.0' and not '3.2' <= sys.version:
-- raise ImportError('Python version not supported')
--
- tests_require = ['nose', 'pycountry',
- 'dnspython' if sys.version < '3.0' else 'dnspython3']
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-FormEncode.git/commitdiff/f0cb4fcf9bce005a31ba98903889f4960f5a154b
More information about the pld-cvs-commit
mailing list