From patchwork Mon Feb 10 04:35:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Clark X-Patchwork-Id: 11372453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3C1B921 for ; Mon, 10 Feb 2020 04:37:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B04DE20870 for ; Mon, 10 Feb 2020 04:37:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zxs+zpS/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B04DE20870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j10nU-00012n-0t; Mon, 10 Feb 2020 04:35:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j10nS-00012g-TD for xen-devel@lists.xenproject.org; Mon, 10 Feb 2020 04:35:46 +0000 X-Inumbo-ID: c96d1158-4bbe-11ea-a759-bc764e2007e4 Received: from mail-pg1-x52f.google.com (unknown [2607:f8b0:4864:20::52f]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c96d1158-4bbe-11ea-a759-bc764e2007e4; Mon, 10 Feb 2020 04:35:38 +0000 (UTC) Received: by mail-pg1-x52f.google.com with SMTP id z12so3217793pgl.4 for ; Sun, 09 Feb 2020 20:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v9HnCkKPrsIqlJxzhjJpBoHtcZFvnXPakVq0tT3Ud7Q=; b=Zxs+zpS/meXh6ktIfnQ3bVGPtqmPnBj+VAUpXc3rzqYdu4boh/fE/vf4Dy9LePJoaP hjiB1mgwxpc15P8lte/Et5Z+hYYGYJ6AavrFLDPU4bXgxVATjMr0hAQi2QJgS5I54Erw IfNXoDuNcrO/7gKaJA4fzKPhodxEi8/cIr+gdXAxHxqs0yNdZ1YmVBHk0A4E+IdI3JkM l1FLxyexRglJpT5BMOGPF0k2VEY/A0W+UxDuP8swpmdaskB4obZDroZJaDOZyc6SalbD OMql6Zv6T48wrByZK7KtPhBatQw07ym0gKicNEJevinXt23RAX9MCoaLIP1RmM67NEvx ho8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v9HnCkKPrsIqlJxzhjJpBoHtcZFvnXPakVq0tT3Ud7Q=; b=gFHaD4+rHk9CmX7nkWNJfHhpejf3kISct+w8wua2d29+h6Hl0Ajkl08Y65DLocU9ZQ jtgyGtJ10hM3GdLR5c8jb2JmOecuA+ZT2i4g6SUelMCTwSY+ecQQ0SrZzkMNBdX9Hk1w lTBgD17Q03los07FUAed5dIYYcGA0U1Ejwt45saSaasBUc4yTpFkSypXE9HpIYvbgU9c ATKHVfcIkgORRstGaOK4DLNx+2KOCog+iLztNYVUsLaESfJUeIYG95MjeZHqiGlDICUU jXS9K547pVXFTqp3VQLQLpzE9lR4xly91+hkAVlVYcAmJSzZZhp1Owtn5Yw3lsEuNbJZ SW0g== X-Gm-Message-State: APjAAAUQOOHsxjFZmEM99A9qspa1WCEhXk3DHGRmqR24fgwuvcRLWgM4 oyt7Sl07gBHrdJ3uSlt8OoO6msRc X-Google-Smtp-Source: APXvYqyk9VwzGTq0ta/Y6swk/uNnlIBvC86pvKototwXzA4TRdO0/oJ49t8t/u5NVW2gzWCkXXs6Yg== X-Received: by 2002:aa7:9205:: with SMTP id 5mr11351460pfo.213.1581309337457; Sun, 09 Feb 2020 20:35:37 -0800 (PST) Received: from desktop.ice.pyrology.org (static-50-53-74-115.bvtn.or.frontiernet.net. [50.53.74.115]) by smtp.gmail.com with ESMTPSA id l15sm9089246pgi.31.2020.02.09.20.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 20:35:36 -0800 (PST) From: Christopher Clark To: xen-devel@lists.xenproject.org Date: Sun, 9 Feb 2020 20:35:16 -0800 Message-Id: <20200210043516.1996-3-christopher.w.clark@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200210043516.1996-1-christopher.w.clark@gmail.com> References: <20200210043516.1996-1-christopher.w.clark@gmail.com> Subject: [Xen-devel] [PATCH 2/2] python, pygrub: pass DISTUTILS env vars as setup.py args X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Rich Persaud , Ian Jackson , Maciej Pijanowski , Wei Liu MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 This enables the distro build system to pass additional args to the python setup.py build and install commands. Signed-off-by: Christopher Clark --- 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)