StackStorm / st2sdk

This repository contains different utilities and tools which help with the StackStorm integration pack development.
Apache License 2.0
10 stars 11 forks source link

Fix setup.py requiring six module #28

Closed nmaludy closed 5 years ago

nmaludy commented 5 years ago

For the last 2 days we've been seeing errors like this in our CI/CD pipelines:

    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: /ci_stackstorm/packs/stackstorm-patching_encore/ci/virtualenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/ci_stackstorm/packs/stackstorm-patching_encore/ci/virtualenv/src/st2sdk/setup.py'"'"'; __file__='"'"'/ci_stackstorm/packs/stackstorm-patching_encore/ci/virtualenv/src/st2sdk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /ci_stackstorm/packs/stackstorm-patching_encore/ci/virtualenv/src/st2sdk/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/ci_stackstorm/packs/stackstorm-patching_encore/ci/virtualenv/src/st2sdk/setup.py", line 21, in <module>
        import six
    ImportError: No module named six
    ----------------------------------------

It appears to be caused by https://github.com/StackStorm/st2sdk/commit/6fdfe4b1f7de47571089ed6f6330fa772f7faec3#diff-b4ef698db8ca845e5845c4618278f29a

In setup.py we now import six and since six isn't necessarily installed in the virtualenv before installing st2sdk the installation fails.

This simple changes removes the dependency on six from setup.py so we should be able to install st2sdk like before.

@Kami can you check this out?

Kami commented 5 years ago

Good catch, thanks :+1: