eucalyptus / eutester

Automated Test Framework for Eucalyptus
Other
36 stars 44 forks source link

"python setup.py install" dies, "mock" can't find required version of "setuptools" #376

Closed lincolnthomas closed 8 years ago

lincolnthomas commented 8 years ago

In the latest code, "python setup.py install" fails with the error:

$ python setup.py install
running install
[ ... ]
Searching for mock
Reading https://pypi.python.org/simple/mock/
Best match: mock 1.3.0
Downloading https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz#md5=73ee8a4afb3ff4da1b4afa287f39fdeb
Processing mock-1.3.0.tar.gz
Writing /tmp/easy_install-rLfI9X/mock-1.3.0/setup.cfg
Running mock-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rLfI9X/mock-1.3.0/egg-dist-tmp-WDa6fK
mock requires setuptools>=17.1. Aborting installation
error: Setup script exited with 1
lincolnthomas commented 8 years ago

This problem has been seen before, e.g. https://github.com/testing-cabal/mock/issues/316#issuecomment-140274305 , and the workaround was:

pip install --upgrade pip
pip install --force-reinstall mock

However, we believe we really don't need the "mock" package anyway. It's only referenced in tests/Test-eucaops-init.py as an import, and nothing mock-like is ever used.

Therefore, we should be able to remove that import, and remove mock from the setup.py: (diff)

       install_requires = ['paramiko >= 1.7','boto >= 2.5.2', 'jinja2 >= 2.7', 'argparse',
-                          'futures', 'python-dateutil', 'mock', 'dnspython', 'pywinrm',
+                          'futures', 'python-dateutil', 'dnspython', 'pywinrm',
                           'BeautifulSoup', 'requests >= 1', 'prettytable'],

This has shown no adverse effects in my testing so far on my fork https://github.com/lincolnthomas/eutester , but I'm getting an unrelated error I need to resolve before I finish my testing. Work continues.

lincolnthomas commented 8 years ago

New issue https://github.com/eucalyptus/eutester/issues/381 has been written for the failure I found during regression testing, which is unrelated to this change.

This issue has been fixed, and no problems were found in concise and full regression tests of all python eutester tests. Making the pull request.

tbeckham commented 8 years ago

@shaon or @nephomaniac is this something already taken care of in the eutester rewrite? If not can you review this change?

lincolnthomas commented 8 years ago

Pull request https://github.com/eucalyptus/eutester/issues/382 merged upstream, issue closed. Thanks Shaon!