aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/cloud-init/cloud-init/0001-setup.py-check-for-install-anywhere-in-args.patch
blob: e5b214fee5d752ae7cc519e6f5561d586d2143f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 5c96379a4727c07fb5222208525013ec8b878184 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Wed, 4 Nov 2020 21:15:50 -0500
Subject: [PATCH] setup.py: check for 'install' anywhere in args

The python3distutils bbclass calls setup.py in a different way then
cloud-init expects .. the 'install' is not argument 1, but is in fact
after a 'build' and some other options.

So rather than checking for install to be argv[1], we check for it
anywhere in the arguments are trigger the template replacement to
happen.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: git/setup.py
===================================================================
--- git.orig/setup.py
+++ git/setup.py
@@ -60,7 +60,7 @@
     that files are different outside of the debian directory."""
 
     # newer versions just use install.
-    if "install" not in sys.argv:
+    if not ('install' in sys.argv or sys.argv[1].startswith('bdist*')):
         return template
 
     tmpl_ext = ".tmpl"