StackStorm / StackStorm/st2

st2client could not be installed when setuptools>=50.0.0

Open
#5,036 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue help wanted
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

Provide a quick summary of your bug report.

STACKSTORM VERSION

not relevant

OS, environment, install method

not relevant

Steps to reproduce the problem

  1. run python image -> docker run --rm -it --entrypoint=sh python:3.7
  2. install setuptools>=50.0.0 pip install setuptools>=50.0.0
  3. try to install st2client in the container pip install st2client==3.2.0

however, when setuptools<50.0.0 was installed, st2client can be installed.

Expected Results

exceted st2client can be installed.

Actual Results

error occurs when installing

# pip install st2client==3.2.0
Collecting st2client==3.2.0
  Downloading st2client-3.2.0.tar.gz (104 kB)
     |████████████████████████████████| 104 kB 134 kB/s
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f4z91qt3/st2client/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f4z91qt3/st2client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-o1xxfeb4
         cwd: /tmp/pip-install-f4z91qt3/st2client/
    Complete output (17 lines):
    /usr/local/lib/python3.7/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
      warnings.warn("Setuptools is replacing distutils.")
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-f4z91qt3/st2client/setup.py", line 63, in <module>
        'st2 = st2client.shell:main'
      File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in _install_setup_requires
        dist.parse_config_files(ignore_option_errors=True)
      File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 665, in parse_config_files
        self._parse_config_files(filenames=filenames)
      File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 572, in _parse_config_files
        filenames = self.find_config_files()
      File "/usr/local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 353, in find_config_files
        sys_dir = os.path.dirname(sys.modules['distutils'].__file__)
    KeyError: 'distutils'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in the Python 3.7 container using the listed setuptools and st2client versions. Start with st2client/setup.py around line 63 and the setuptools traceback, then verify that st2client installs successfully with setuptools>=50.0.0 and that the st2 command remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.