[python-wtforms] Rework the output of %find_lang to remove duplicated files b/w py2 and py3 packages

Pierre-YvesChibon pingou at fedoraproject.org
Mon Dec 1 09:52:05 UTC 2014


commit 692daed5f002d55a735aa37566abd4de38732adc
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date:   Mon Dec 1 10:32:57 2014 +0100

    Rework the output of %find_lang to remove duplicated files b/w py2 and py3 packages

 python-wtforms.spec |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/python-wtforms.spec b/python-wtforms.spec
index f70dd79..eb4b90d 100644
--- a/python-wtforms.spec
+++ b/python-wtforms.spec
@@ -71,16 +71,34 @@ popd
 
 %find_lang wtforms
 
-%files -f wtforms.lang
+grep -v %{python3_sitelib} wtforms.lang > python-wtforms.lang
+grep -v %{python_sitelib} wtforms.lang > python3-wtforms.lang
+
+find $RPM_BUILD_ROOT%{python3_sitelib}/wtforms/locale  -name "*.po*" -delete
+find $RPM_BUILD_ROOT%{python_sitelib}/wtforms/locale  -name "*.po*" -delete
+
+%files -f python-wtforms.lang
 %doc docs/ LICENSE.txt PKG-INFO
 %{python_sitelib}/*.egg-info
-%{python_sitelib}/wtforms/
+%dir %{python_sitelib}/wtforms/
+%{python_sitelib}/wtforms/*.py*
+%{python_sitelib}/wtforms/csrf/
+%{python_sitelib}/wtforms/ext/
+%{python_sitelib}/wtforms/fields/
+%{python_sitelib}/wtforms/widgets/
 
 %if 0%{?with_python3}
-%files -n python3-wtforms -f wtforms.lang
+%files -n python3-wtforms -f python3-wtforms.lang
 %doc docs/ LICENSE.txt PKG-INFO
 %{python3_sitelib}/*.egg-info/
-%{python3_sitelib}/wtforms/
+%dir %{python3_sitelib}/wtforms/
+%{python3_sitelib}/wtforms/*.py*
+%{python3_sitelib}/wtforms/csrf/
+%{python3_sitelib}/wtforms/ext/
+%{python3_sitelib}/wtforms/fields/
+%{python3_sitelib}/wtforms/widgets/
+%{python3_sitelib}/wtforms/__pycache__/
+
 %endif
 
 %changelog


More information about the scm-commits mailing list