Source: python-systemd
Severity: normal
Tags: patch

Hello,

Could you please provide systemd bindings for Python 3 as well?

I have attached a patch that might work. I wasn't able to test this
because for me systemd currently fails to build from source:

/usr/include/x86_64-linux-gnu/sys/xattr.h:32:3: error: expected identifier 
before numeric constant
   XATTR_CREATE = 1, /* set value, fail if attr already exists.  */
   ^
Makefile:9750: recipe for target 'src/core/libsystemd_core_la-socket.lo' failed
make[4]: *** [src/core/libsystemd_core_la-socket.lo] Error 1


If someone tells me how to fix or work around that, I'll be happy to
help with the Python 3 package.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -ur systemd-208/debian/control systemd-208.new/debian/control
--- systemd-208/debian/control	2014-07-15 15:44:42.000000000 -0700
+++ systemd-208.new/debian/control	2014-08-10 18:24:25.757041485 -0700
@@ -38,6 +38,7 @@
                libgirepository1.0-dev (>= 1.31.1),
                gobject-introspection (>= 1.31.1),
                python-dev,
+               python3-dev,
                libglib2.0-doc
 
 Package: systemd
@@ -353,6 +354,16 @@
 Description: python bindings for systemd
  This package contains Python bindings for the systemd libraries.
 
+Package: python3-systemd
+Section: python
+Priority: optional
+Architecture: linux-any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         ${python3:Depends}
+Description: python 3 bindings for systemd
+ This package contains Python 3 bindings for the systemd libraries.
+
 Package: systemd-dbg
 Architecture: linux-any
 Section: debug
diff -ur systemd-208/debian/rules systemd-208.new/debian/rules
--- systemd-208/debian/rules	2014-07-15 15:44:42.000000000 -0700
+++ systemd-208.new/debian/rules	2014-08-10 18:23:36.253469199 -0700
@@ -218,7 +218,7 @@
 
 %:
 ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
-	dh $@ --with autoreconf,gir,python2
+	dh $@ --with autoreconf,gir,python2,python3
 else
-	dh $@ --with autoreconf,python2 $(BOOTSTRAP_DH_FLAGS)
+	dh $@ --with autoreconf,python2,python3 $(BOOTSTRAP_DH_FLAGS)
 endif

Reply via email to