All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Clark <christopher.w.clark@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Rich Persaud <persaur@gmail.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Maciej Pijanowski <maciej.pijanowski@3mdeb.com>,
	Wei Liu <wl@xen.org>
Subject: [Xen-devel] [PATCH 2/2] python, pygrub: pass DISTUTILS env vars as setup.py args
Date: Sun,  9 Feb 2020 20:35:16 -0800	[thread overview]
Message-ID: <20200210043516.1996-3-christopher.w.clark@gmail.com> (raw)
In-Reply-To: <20200210043516.1996-1-christopher.w.clark@gmail.com>

Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
as well as other parameters set by the OpenEmbedded build system.
This is especially useful when the target libdir is not the default one
(/usr/lib), but for example /usr/lib64.

Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>

This enables the distro build system to pass additional args to the
python setup.py build and install commands.
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
---
Original patch from the Yocto/OpenEmbedded meta-virtualization layer.
Rewrapped and rebased onto the adjacent commit submitted in this series.

 tools/pygrub/Makefile | 6 ++++--
 tools/python/Makefile | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index b4f6f10ddd..430ceeed16 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -10,14 +10,16 @@ INSTALL_LOG = build/installed_files.txt
 all: build
 .PHONY: build
 build:
-	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
+	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
+		setup.py build $(DISTUTILS_BUILD_ARGS)
 
 .PHONY: install
 install: all
 	$(INSTALL_DIR) $(DESTDIR)/$(bindir)
 	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
 		setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
-		 --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
+		 --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
+		$(DISTUTILS_INSTALL_ARGS)
 	rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
 	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
diff --git a/tools/python/Makefile b/tools/python/Makefile
index e99f78a537..294f8ee4dd 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
 
 .PHONY: build
 build:
-	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build
+	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
 
 .PHONY: install
 install:
@@ -18,7 +18,7 @@ install:
 
 	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
 		setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
-		--root="$(DESTDIR)" --force
+		--root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
 
 	$(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2020-02-10  4:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10  4:35 [Xen-devel] [PATCH] tools/configure: generate stubs and long-double 32-bit headers if needed Christopher Clark
2020-02-10  4:35 ` [Xen-devel] [PATCH 1/2] pygrub: fix python3 cross-compile: install with INSTALL_PYTHON_PROG Christopher Clark
2020-02-10 16:16   ` Ian Jackson
2020-02-10  4:35 ` Christopher Clark [this message]
2020-02-10 16:10   ` [Xen-devel] [PATCH 2/2] python, pygrub: pass DISTUTILS env vars as setup.py args Ian Jackson
2020-02-10 12:42 ` [Xen-devel] [PATCH] tools/configure: generate stubs and long-double 32-bit headers if needed Roger Pau Monné
2020-02-10 16:21 ` Ian Jackson
2020-02-24  5:37   ` Christopher Clark

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=20200210043516.1996-3-christopher.w.clark@gmail.com \
    --to=christopher.w.clark@gmail.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=maciej.pijanowski@3mdeb.com \
    --cc=persaur@gmail.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.