diff --git a/.gitignore b/.gitignore index 16e776d..8df9286 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /WTForms-0.6.3.zip WTForms-1.0.2.zip /WTForms-2.0.zip +/wtforms-2.2.1.tar.gz diff --git a/143.patch b/143.patch deleted file mode 100644 index dcbfa94..0000000 --- a/143.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 312962b85e3f59117efbdb7d7faf7c1c4ff17f5d Mon Sep 17 00:00:00 2001 -From: Pierre-Yves Chibon -Date: Mon, 1 Dec 2014 11:19:45 +0100 -Subject: [PATCH] Adjust messages_path to support having the locale files in - /usr/share/locale - -Linux distribution normally centralize their locale files in /usr/share/locale -as a central place. -With this commit we check if the expected locale directory is present if so we -use it, otherwise we use /usr/share/locale. - -This will allow packager of wtforms in Linux distribution to place the locale -files in the expected location in their distro ---- - wtforms/i18n.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/wtforms/i18n.py b/wtforms/i18n.py -index 3b45aa6..118e416 100644 ---- a/wtforms/i18n.py -+++ b/wtforms/i18n.py -@@ -6,7 +6,10 @@ def messages_path(): - Determine the path to the 'messages' directory as best possible. - """ - module_path = os.path.abspath(__file__) -- return os.path.join(os.path.dirname(module_path), 'locale') -+ locale_path = os.path.join(os.path.dirname(module_path), 'locale') -+ if not os.path.exists(locale_path): -+ locale_path = '/usr/share/locale' -+ return locale_path - - - def get_builtin_gnu_translations(languages=None): diff --git a/python-wtforms.spec b/python-wtforms.spec index aa37f7f..ea2104b 100644 --- a/python-wtforms.spec +++ b/python-wtforms.spec @@ -1,17 +1,14 @@ -%global mod_name WTForms +%global mod_name wtforms Name: python-wtforms -Version: 2.0 -Release: 15%{?dist} +Version: 2.2.1 +Release: 1%{?dist} Summary: Forms validation and rendering library for python Group: Development/Libraries License: BSD URL: http://wtforms.simplecodes.com/ -Source0: http://pypi.python.org/packages/source/W/%{mod_name}/%{mod_name}-%{version}.zip - -# Submitted upstream at https://github.com/wtforms/wtforms/pull/143 -Patch0: 143.patch +Source0: http://pypi.python.org/packages/source/W/%{mod_name}/%{mod_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel @@ -44,18 +41,13 @@ and keep those messy parameters out of your python code. %prep %setup -q -n %{mod_name}-%{version} -%patch0 -p1 -sed -i "s|\r||g" docs/html/_sources/index.txt -sed -i "s|\r||g" docs/conf.py sed -i "s|\r||g" docs/Makefile -sed -i "s|\r||g" docs/index.rst -sed -i "s|\r||g" docs/html/_static/jquery.js -rm -f docs/html/.buildinfo rm -rf %{py3dir} cp -a . %{py3dir} %build +rm wtforms/locale/README.md %{__python2} setup.py build pushd %{py3dir} @@ -63,30 +55,38 @@ pushd %{py3dir} popd %install -%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT + +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} mkdir -p %{buildroot}/%{_datadir} mv %{buildroot}/%{python_sitelib}/wtforms/locale %{buildroot}%{_datadir} find %{buildroot}%{_datadir}/locale -name '*.po*' -delete pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/wtforms/locale +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +rm -rf %{buildroot}/%{python3_sitelib}/wtforms/locale popd -%find_lang wtforms +#% find_lang wtforms -%files -n python2-wtforms -f wtforms.lang -%doc docs/ LICENSE.txt PKG-INFO +%files -n python2-wtforms +# -f wtforms.lang +%doc docs/ README.rst AUTHORS.rst CHANGES.rst +%license LICENSE.rst %{python_sitelib}/*.egg-info %{python_sitelib}/wtforms/ -%files -n python%{python3_pkgversion}-wtforms -f wtforms.lang -%doc docs/ LICENSE.txt PKG-INFO +%files -n python%{python3_pkgversion}-wtforms +# -f wtforms.lang +%doc docs/ README.rst AUTHORS.rst CHANGES.rst +%license LICENSE.rst %{python3_sitelib}/*.egg-info/ %{python3_sitelib}/wtforms/ %changelog +* Sat Jun 30 2018 Itamar Reis Peixoto - 2.2.1-1 +- new version 2.2.1 + * Tue Jun 19 2018 Miro HronĨok - 2.0-15 - Rebuilt for Python 3.7 diff --git a/sources b/sources index db56b3b..e0166fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e235f22bf5bbbca8dd1072c05fd18137 WTForms-2.0.zip +SHA512 (wtforms-2.2.1.tar.gz) = db989ff5352d6834fc51c0ed208de11c12a2c0ad90f73dfeaa8f9995edc7f840deb427f1ffc6167f1c24e44f2137ecbb27ee1113258a6c55ed256a603657ef97