[systemd] Package also Python 3 bindings
Zbigniew Jędrzejewski-Szmek
zbyszek at fedoraproject.org
Thu Aug 15 01:51:01 UTC 2013
commit b75a1735a7f3f7a9dafd1ca9ffe98164d5dc984e
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Jun 18 12:12:27 2013 -0400
Package also Python 3 bindings
systemd.spec | 68 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 49 insertions(+), 19 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index cc98354..4a828df 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -13,7 +13,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 206
-Release: 2%{?gitcommit:.git%{gitcommit}}%{?dist}
+Release: 3%{?gitcommit:.git%{gitcommit}}%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager
@@ -62,6 +62,7 @@ BuildRequires: intltool
BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: python2-devel
+BuildRequires: python3-devel
%if %{defined gitcommit}%{num_patches}
BuildRequires: automake
BuildRequires: autoconf
@@ -147,12 +148,22 @@ Requires: %{name} = %{version}-%{release}
SysV compatibility tools for systemd
%package python
-Summary: Python Bindings for systemd
+Summary: Python 2 bindings for systemd
+License: LGPLv2+
+Requires: %{name} = %{version}-%{release}
+
+%package python3
+Summary: Python 3 bindings for systemd
License: LGPLv2+
Requires: %{name} = %{version}-%{release}
%description python
-This package contains python binds for systemd APIs
+This package contains bindings which allow Python 2 programs to use
+systemd APIs
+
+%description python3
+This package contains bindings which allow Python 3 programs to use
+systemd APIs
%package -n libgudev1
Summary: Libraries for adding libudev support to applications that use glib
@@ -210,16 +221,40 @@ systemd-journal-gatewayd serves journal events over the network using HTTP.
%endif
%endif
+# first make python3 while source directory is empty
+rm -rf build2 build3
+mkdir build2
+mkdir build3
+
+pushd build3
+%define _configure ../configure
+%configure \
+ --libexecdir=%{_prefix}/lib \
+ --disable-manpages \
+ --with-sysvinit-path=/etc/rc.d/init.d \
+ --with-rc-local-script-path-start=/etc/rc.d/rc.local \
+ PYTHON=%{__python3}
+make %{?_smp_mflags}
+popd
+
+pushd build2
%configure \
--libexecdir=%{_prefix}/lib \
--enable-gtk-doc \
- --disable-static \
--with-sysvinit-path=/etc/rc.d/init.d \
--with-rc-local-script-path-start=/etc/rc.d/rc.local
make %{?_smp_mflags} V=1
+popd
%install
+# first install python3 so the binaries are overwritten by the python2 ones
+pushd build3
+%make_install
+popd
+pushd build2
%make_install
+popd
+
find %{buildroot} \( -name '*.a' -o -name '*.la' \) -delete
# udev links
@@ -237,7 +272,7 @@ ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit
ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel
# legacy links
-ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl
+ln -sf loginctl %{buildroot}%{_bindir}/systemd-loginctl
# We create all wants links manually at installation time to make sure
# they are not owned and hence overriden by rpm after the used deleted
@@ -750,20 +785,12 @@ getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g
%{_datadir}/gtk-doc/html/libudev/*
%files python
-%{python_sitearch}/systemd/__init__.py
-%{python_sitearch}/systemd/__init__.pyc
-%{python_sitearch}/systemd/__init__.pyo
-%{python_sitearch}/systemd/_journal.so
-%{python_sitearch}/systemd/_reader.so
-%{python_sitearch}/systemd/_daemon.so
-%{python_sitearch}/systemd/id128.so
-%{python_sitearch}/systemd/login.so
-%{python_sitearch}/systemd/journal.py
-%{python_sitearch}/systemd/journal.pyc
-%{python_sitearch}/systemd/journal.pyo
-%{python_sitearch}/systemd/daemon.py
-%{python_sitearch}/systemd/daemon.pyc
-%{python_sitearch}/systemd/daemon.pyo
+%{python_sitearch}/systemd
+%{python_sitearch}/systemd/*
+
+%files python3
+%{python3_sitearch}/systemd
+%{python3_sitearch}/systemd/*
%files -n libgudev1
%{_libdir}/libgudev-1.0.so.*
@@ -786,6 +813,9 @@ getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g
%{_datadir}/systemd/gatewayd
%changelog
+* Sun Aug 11 2013 Zbigniew Jedrzejewski-Szmek <zbyszek at in.waw.pl> - 206-3
+- New systemd-python3 package (#976427).
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 206-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list