blob: 5c9c1e6f3575c3a36d772a4bfb5af5a30f41a20a (
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
|
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.
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
@@ -87,7 +87,7 @@
# older versions of tox use bdist (xenial), and then install from there.
# newer versions just use install.
- if not (sys.argv[1] == "install" or sys.argv[1].startswith("bdist*")):
+ if not ('install' in sys.argv or sys.argv[1].startswith('bdist*')):
return template
tmpl_ext = ".tmpl"
|