------------------------------------------------------------
revno: 1819
fixes bug: https://launchpad.net/bugs/1838866
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Fri 2019-08-16 08:18:03 -0700
message:
  Extend sys.path with site.getsitepackages().
modified:
  NEWS
  misc/paths.py.in


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'NEWS'
--- NEWS	2019-06-21 21:20:30 +0000
+++ NEWS	2019-08-16 15:18:03 +0000
@@ -63,6 +63,9 @@
       -bounces and -request addresses in each virtual domain are now added
       to data/virtual-mailman (-owner was done in 2.1.24).  (LP: #1831777)
 
+    - The paths.py module now extends sys.path with the result of
+      site.getsitepackages() if available.  (LP: #1838866)
+
 2.1.29 (24-Jul-2018)
 
   Bug Fixes

=== modified file 'misc/paths.py.in'
--- 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

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to