| |
@@ -1,11 +1,8 @@
|
| |
%global mod_name WTForms
|
| |
- %if 0%{?fedora} > 12
|
| |
- %global with_python3 1
|
| |
- %endif
|
| |
|
| |
Name: python-wtforms
|
| |
Version: 2.0
|
| |
- Release: 13%{?dist}
|
| |
+ Release: 14%{?dist}
|
| |
Summary: Forms validation and rendering library for python
|
| |
|
| |
Group: Development/Libraries
|
| |
@@ -19,10 +16,9 @@
|
| |
BuildArch: noarch
|
| |
BuildRequires: python2-devel
|
| |
BuildRequires: python2-setuptools
|
| |
- %if 0%{?with_python3}
|
| |
- BuildRequires: python3-devel
|
| |
- BuildRequires: python3-setuptools
|
| |
- %endif
|
| |
+
|
| |
+ BuildRequires: python%{python3_pkgversion}-devel
|
| |
+ BuildRequires: python%{python3_pkgversion}-setuptools
|
| |
|
| |
%global _description\
|
| |
With wtforms, your form field HTML can be generated for you.\
|
| |
@@ -37,15 +33,13 @@
|
| |
|
| |
%description -n python2-wtforms %_description
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- %package -n python3-wtforms
|
| |
+ %package -n python%{python3_pkgversion}-wtforms
|
| |
Summary: Forms validation and rendering library for python
|
| |
|
| |
- %description -n python3-wtforms
|
| |
+ %description -n python%{python3_pkgversion}-wtforms
|
| |
With wtforms, your form field HTML can be generated for you.
|
| |
This allows you to maintain separation of code and presentation,
|
| |
and keep those messy parameters out of your python code.
|
| |
- %endif
|
| |
|
| |
|
| |
%prep
|
| |
@@ -58,19 +52,15 @@
|
| |
sed -i "s|\r||g" docs/html/_static/jquery.js
|
| |
rm -f docs/html/.buildinfo
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
rm -rf %{py3dir}
|
| |
cp -a . %{py3dir}
|
| |
- %endif
|
| |
|
| |
%build
|
| |
%{__python2} setup.py build
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
pushd %{py3dir}
|
| |
%{__python3} setup.py build
|
| |
popd
|
| |
- %endif
|
| |
|
| |
%install
|
| |
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
| |
@@ -79,12 +69,10 @@
|
| |
mv %{buildroot}/%{python_sitelib}/wtforms/locale %{buildroot}%{_datadir}
|
| |
find %{buildroot}%{_datadir}/locale -name '*.po*' -delete
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
pushd %{py3dir}
|
| |
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
| |
rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/wtforms/locale
|
| |
popd
|
| |
- %endif
|
| |
|
| |
%find_lang wtforms
|
| |
|
| |
@@ -93,14 +81,16 @@
|
| |
%{python_sitelib}/*.egg-info
|
| |
%{python_sitelib}/wtforms/
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- %files -n python3-wtforms -f wtforms.lang
|
| |
+ %files -n python%{python3_pkgversion}-wtforms -f wtforms.lang
|
| |
%doc docs/ LICENSE.txt PKG-INFO
|
| |
%{python3_sitelib}/*.egg-info/
|
| |
%{python3_sitelib}/wtforms/
|
| |
- %endif
|
| |
|
| |
%changelog
|
| |
+ * Fri Feb 16 2018 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 2.0-14
|
| |
+ - make spec file compatible with epel7
|
| |
+ - remove conditionals, always build for python 3
|
| |
+
|
| |
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0-13
|
| |
- Update Python 2 dependency declarations to new packaging standards
|
| |
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
| |