[mailman/f19] do not use py_byte_compile, remove python3-devel dependency
Jan Kaluža
jkaluza at fedoraproject.org
Thu Mar 14 10:22:18 UTC 2013
commit acb4a0432aa35ab40ef1e1d1634014f5fd12e67e
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Thu Mar 14 11:21:59 2013 +0100
do not use py_byte_compile, remove python3-devel dependency
mailman.spec | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/mailman.spec b/mailman.spec
index ef74e67..fd3df14 100644
--- a/mailman.spec
+++ b/mailman.spec
@@ -4,7 +4,7 @@
Summary: Mailing list manager with built in Web access
Name: mailman
Version: 2.1.15
-Release: 10%{?dist}
+Release: 11%{?dist}
Epoch: 3
Group: Applications/Internet
Source0: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-%{version}.tgz
@@ -50,7 +50,7 @@ Requires(post): systemd-sysv
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: automake
-BuildRequires: python2-devel python3-devel
+BuildRequires: python-devel
BuildRequires: systemd-units
%global contentdir /var/www
@@ -292,7 +292,9 @@ Templates have been moved to %{templatedir}.
EOF
# byte-compile %{mmdir}
-%py_byte_compile %{__python} %{buildroot}%{mmdir}
+#py_byte_compile %{__python} %{buildroot}%{mmdir}
+find %{buildroot}%{mmdir} -type f -a -name "*.py" -print0 | xargs -0 %{__python} -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :
+find %{buildroot}%{mmdir} -type f -a -name "*.py" -print0 | xargs -0 %{__python} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :
# Change permissions of directories to keep rpmlint silent
find %{buildroot}/%{mmdir} -type d -exec chmod 755 {} \;
@@ -371,13 +373,13 @@ fi
# Move mm_cfg.py from /usr/lib/mailman/Mailman to /etc/mailman and create
# symlink to it (#905845).
if [ -f %{_localstatedir}/lib/rpm-state/mailman/mm_cfg.py ]; then
- cp -p %{mmdir}/Mailman/mm_cfg.py.rpm.move %{configdir}/mm_cfg.py
+ cp -p %{_localstatedir}/lib/rpm-state/mailman/mm_cfg.py %{configdir}/mm_cfg.py
fi
# Move mmdir/templates to /etc/mailman/templates
if [ -d %{_localstatedir}/lib/rpm-state/mailman/templates ]; then
cp -pr %{_localstatedir}/lib/rpm-state/mailman/templates/* %{templatedir}
- rm -rf %{mmdir}/templates.rpm.move
+ rm -rf %{_localstatedir}/lib/rpm-state/mailman/templates/
fi
if [ -d %{_localstatedir}/lib/rpm-state/mailman ]; then
@@ -579,6 +581,9 @@ exit 0
%dir %attr(775,root,%{mmgroup}) %{lockdir}
%changelog
+* Thu Mar 14 2013 Jan Kaluza <jkaluza at redhat.com> - 3:2.1.15-11
+- do not use py_byte_compile, remove python3-devel dependency
+
* Thu Mar 14 2013 Jan Kaluza <jkaluza at redhat.com> - 3:2.1.15-10
- fix #921421 - fix /var/spool/mailman/ permissions
- fix #921423 - move mm_cfg.py to /etc/mailman
More information about the scm-commits
mailing list