[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] Drop dependency on distutils



commit a04c9750e72fb2f5f46cb3c04dae14c04bd475b1
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Jan 11 11:16:28 2019 -0800

    Drop dependency on distutils
    
    Python 3.x no longer includes distutils by default...
    
      https://trac.torproject.org/projects/tor/ticket/26099
    
    This is perfectly fine. We only used it to check if pip
    or apt-get was installed. We should be using stem for
    this anyway. I already dropped our dependency on distutils
    in stem for this reason...
    
      https://gitweb.torproject.org/stem.git/commit/?id=9fa85ec
---
 nyx/__init__.py          | 5 ++---
 web/changelog/index.html | 1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nyx/__init__.py b/nyx/__init__.py
index b5d05cd..5a61205 100644
--- a/nyx/__init__.py
+++ b/nyx/__init__.py
@@ -43,7 +43,6 @@ Tor curses monitoring application.
 """
 
 import contextlib
-import distutils.spawn
 import getpass
 import os
 import platform
@@ -177,9 +176,9 @@ def main():
     nyx.starter.main()
   except ImportError as exc:
     if exc.message == 'No module named stem':
-      if distutils.spawn.find_executable('pip') is not None:
+      if stem.util.system.is_available('pip'):
         advice = ", try running 'sudo pip install stem'"
-      elif distutils.spawn.find_executable('apt-get') is not None:
+      elif stem.util.system.is_available('apt-get'):
         advice = ", try running 'sudo apt-get install python-stem'"
       else:
         advice = ', you can find it at https://stem.torproject.org/download.html'
diff --git a/web/changelog/index.html b/web/changelog/index.html
index c0f823f..b7d6057 100644
--- a/web/changelog/index.html
+++ b/web/changelog/index.html
@@ -78,6 +78,7 @@
             <li>Nyxrc <i>password</i> option for the controller credential (<a href="https://trac.torproject.org/projects/tor/ticket/28295";>ticket</a>)</li>
             <li>Accept shorthand '--interface' arugments with a colon but no address (<a href="https://trac.torproject.org/projects/tor/ticket/28965";>ticket</a>)</li>
             <li>Notification when connection information is unavailable (<a href="https://trac.torproject.org/projects/tor/ticket/24958";>ticket</a>)</li>
+            <li>When using python 3.x unable to run if distutils was unavailable (<a href="https://trac.torproject.org/projects/tor/ticket/26099";>ticket</a>)</li>
           </ul>
         </li>
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits