From: Daniel J Walsh <dwalsh@redhat.com>
To: SELinux <selinux@tycho.nsa.gov>
Cc: David Malcolm <dmalcolm@redhat.com>
Subject: libsemanage python3 support.
Date: Thu, 06 May 2010 11:57:24 -0400 [thread overview]
Message-ID: <4BE2E6E4.90400@redhat.com> (raw)
[-- 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 --]
reply other threads:[~2010-05-06 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE2E6E4.90400@redhat.com \
--to=dwalsh@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.