* libsemanage python3 support.
@ 2010-05-06 15:57 Daniel J Walsh
0 siblings, 0 replies; only message in thread
From: Daniel J Walsh @ 2010-05-06 15:57 UTC (permalink / raw)
To: SELinux; +Cc: David Malcolm
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave Malcolm has been working on adding python3 support to libsemanage
(and libselinux).
Change to Makefile to:
# Support building the Python bindings multiple times, against various
Python
# runtimes (e.g. Python 2 vs Python 3) by optionally prefixing the build
# targets with "PYPREFIX":
Should build python2 version by default, without the user doing any changes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkvi5uQACgkQrlYvE4MpobPT4gCfZjtxs171+6HsQNx/cDZTMWp9
VzYAn03cycetc+M3MnJMzAz88zyAYK/I
=JxHy
-----END PGP SIGNATURE-----
[-- Attachment #2: libsemanage-python3.patch --]
[-- Type: text/plain, Size: 1683 bytes --]
diff --git a/src/Makefile b/src/Makefile
index 7acf63d..cdd8388 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,9 +1,15 @@
+# Support building the Python bindings multiple times, against various Python
+# runtimes (e.g. Python 2 vs Python 3) by optionally prefixing the build
+# targets with "PYPREFIX":
+PYTHON ?= python
+PYPREFIX ?=
+
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
LIBDIR ?= $(PREFIX)/lib
SHLIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
-PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]')
+PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
PYINC ?= /usr/include/${PYLIBVER}
PYLIBDIR ?= $(LIBDIR)/${PYLIBVER}
RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
@@ -34,9 +40,9 @@ SWIGIF= semanageswig_python.i
SWIGRUBYIF= semanageswig_ruby.i
SWIGCOUT= semanageswig_wrap.c
SWIGRUBYCOUT= semanageswig_ruby_wrap.c
-SWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT))
+SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT))
SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT))
-SWIGSO=_semanage.so
+SWIGSO=$(PYPREFIX)_semanage.so
SWIGFILES=$(SWIGSO) semanage.py
SWIGRUBYSO=_rubysemanage.so
LIBSO=$(TARGET).$(LIBVERSION)
@@ -132,7 +138,9 @@ install: all
install-pywrap: pywrap
test -d $(PYLIBDIR)/site-packages || install -m 755 -d $(PYLIBDIR)/site-packages
- install -m 755 $(SWIGFILES) $(PYLIBDIR)/site-packages
+ install -m 755 $(SWIGSO) $(PYLIBDIR)/site-packages/_semanage.so
+ install -m 755 semanage.py $(PYLIBDIR)/site-packages
+
install-rubywrap: rubywrap
test -d $(RUBYINSTALL) || install -m 755 -d $(RUBYINSTALL)
[-- Attachment #3: libsemanage-python3.patch.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-06 15:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 15:57 libsemanage python3 support Daniel J Walsh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.