summaryrefslogtreecommitdiff
path: root/net-mail/mailman/files/mailman-2.1.29-fix-libdir.diff
blob: f095938ff42a17fce532fdaa1ee74c3c704a546c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- misc/paths.py.in	2018-06-17 23:47:34 +0000
+++ misc/paths.py.in	2019-08-16 15:18:03 +0000
@@ -67,6 +67,16 @@
                        'dist-packages')
 sys.path.append(distdir)
 
+# Some distros may have the python library in a directory other than lib/
+# such as Lib/ or lib64/.  Hopefully they will have hacked
+# site.getsitepackages() to return the right thing.
+try:
+    import site
+    sys.path.extend(site.getsitepackages())
+    del site
+except (ImportError, AttributeError):
+    pass
+
 
 # In a normal interactive Python environment, the japanese.pth and korean.pth
 # files would be imported automatically.  But because we inhibit the importing