File: Disable-install-of-appdata.patch

package info (click to toggle)
pyzo 4.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 62,160 kB
  • sloc: python: 24,768; makefile: 160; xml: 36
file content (41 lines) | stat: -rw-r--r-- 1,620 bytes parent folder | download
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
34
35
36
37
38
39
40
41
From: Ghislain Antony Vaillant <ghisvail@gmail.com>
Date: Fri, 22 Apr 2016 12:57:19 +0100
Subject: Disable install of appdata.
Forwarded: not-needed

---

--- a/setup.py
+++ b/setup.py
@@ -102,17 +102,17 @@ setup(
 
 # Post processing:
 # Install appdata.xml on Linux if we are installing in the system Python
-if sys.platform.startswith("linux") and sys.prefix.startswith("/usr"):
-    if len(sys.argv) >= 2 and sys.argv[1] == "install":
-        fname = "pyzo.appdata.xml"
-        filename1 = os.path.join(os.path.dirname(__file__), fname)
-        filename2 = os.path.join("/usr/share/metainfo", fname)
-        try:
-            bb = open(filename1, "rb").read()
-            open(filename2, "wb").write(bb)
-        except PermissionError:
-            pass  # No sudo, no need to warn
-        except Exception as err:
-            print("Could not install %s: %s" % (fname, str(err)))
-        else:
-            print("Installed %s" % fname)
+# if sys.platform.startswith("linux") and sys.prefix.startswith("/usr"):
+#     if len(sys.argv) >= 2 and sys.argv[1] == "install":
+#         fname = "pyzo.appdata.xml"
+#         filename1 = os.path.join(os.path.dirname(__file__), fname)
+#         filename2 = os.path.join("/usr/share/metainfo", fname)
+#         try:
+#             bb = open(filename1, "rb").read()
+#             open(filename2, "wb").write(bb)
+#         except PermissionError:
+#             pass  # No sudo, no need to warn
+#         except Exception as err:
+#             print("Could not install %s: %s" % (fname, str(err)))
+#         else:
+#             print("Installed %s" % fname)