[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] python, pygrub: pass DISTUTILS env vars as setup.py args



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@xxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.