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

[tor-commits] [stem/master] Fix difference in setuptools installation paths



commit 71184e68b86c54e4f87e5fb3ff70d437303c03e4
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Mar 30 19:11:41 2020 -0700

    Fix difference in setuptools installation paths
    
    An assertion that we install all our expected files is failing...
    
      ======================================================================
      FAIL: test_install
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/atagar/Desktop/stem/stem/util/test_tools.py", line 141, in <lambda>
          self.method = lambda test: self.result(test)  # method that can be mixed into TestCases
        File "/home/atagar/Desktop/stem/stem/util/test_tools.py", line 208, in result
          test.fail(self._result.msg)
      AssertionError: The following files were expected to be in our installation but weren't. Maybe our setup.py needs to be updated?
    
      stem/directory.py
      stem/util/ed25519.py
      stem/descriptor/networkstatus.py
      ...
    
    The trouble is that setuptools adds an extra directory...
    
      distutil path:   [install-prefix]/lib/python3.7/site-packages/stem/version.py
      setuptools path: [install-prefix]/lib/python3.7/site-packages/stem-1.8.0.dev0-py3.7.egg/stem/version.py
    
    Adjusting our glob to account for this difference.
---
 test/integ/installation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integ/installation.py b/test/integ/installation.py
index 16d63538..fc1e4880 100644
--- a/test/integ/installation.py
+++ b/test/integ/installation.py
@@ -78,7 +78,7 @@ class TestInstallation(unittest.TestCase):
         if platform.python_implementation() == 'PyPy':
           site_packages_paths = glob.glob('%s/site-packages' % BASE_INSTALL_PATH)
         else:
-          site_packages_paths = glob.glob('%s/lib*/*/site-packages' % BASE_INSTALL_PATH)
+          site_packages_paths = glob.glob('%s/lib*/*/site-packages/*' % BASE_INSTALL_PATH)
       except Exception as exc:
         raise AssertionError("Unable to install with 'python setup.py install': %s" % exc)
 



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