[packages/python-PyYAML] - cleanup, added examples also to python3 package
qboosh
qboosh at pld-linux.org
Sun Jul 29 21:15:50 CEST 2018
commit 02d6b6451affc24a72f67260202aad2a4b502359
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 29 21:17:53 2018 +0200
- cleanup, added examples also to python3 package
python-PyYAML.spec | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/python-PyYAML.spec b/python-PyYAML.spec
index cb996d0..bf5ec25 100644
--- a/python-PyYAML.spec
+++ b/python-PyYAML.spec
@@ -12,6 +12,9 @@ Version: 4.1
Release: 1
License: MIT
Group: Libraries/Python
+#Source0Download: https://github.com/yaml/pyyaml/releases
+# TODO:
+#Source0: https://github.com/yaml/pyyaml/archive/%{version}/pyyaml-%{version}.tar.gz
Source0: https://github.com/yaml/pyyaml/archive/%{version}.tar.gz
# Source0-md5: 9e4e48a27e42c28b39cdf4bf9b781f28
URL: https://github.com/yaml/pyyaml
@@ -96,17 +99,22 @@ CFLAGS="%{rpmcflags}" \
%install
rm -rf $RPM_BUILD_ROOT
+
%if %{with python2}
%py_install
+
%py_postclean
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%endif
+
%if %{with python3}
%py3_install
-%endif
-%py_postclean
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-PyYAML-%{version}
+cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/python3-PyYAML-%{version}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -115,9 +123,8 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES LICENSE README
-%dir %{py_sitedir}/yaml
%attr(755,root,root) %{py_sitedir}/_yaml.so
-%{py_sitedir}/yaml/*.py[co]
+%{py_sitedir}/yaml
%{py_sitedir}/PyYAML-%{version}-py*.egg-info
%{_examplesdir}/%{name}-%{version}
%endif
@@ -126,9 +133,8 @@ rm -rf $RPM_BUILD_ROOT
%files -n python3-%{module}
%defattr(644,root,root,755)
%doc CHANGES LICENSE README
-%dir %{py3_sitedir}/yaml
-%{py3_sitedir}/yaml/*.py
-%{py3_sitedir}/yaml/__pycache__
%attr(755,root,root) %{py3_sitedir}/_yaml.cpython-*.so
+%{py3_sitedir}/yaml
%{py3_sitedir}/PyYAML-%{version}-py*.egg-info
+%{_examplesdir}/python3-PyYAML-%{version}
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-PyYAML.git/commitdiff/02d6b6451affc24a72f67260202aad2a4b502359
More information about the pld-cvs-commit
mailing list