Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traceback running setup.py clean: ModuleNotFoundError: No module named 'setuptools' #6642

Closed
cjerdonek opened this issue Jun 24, 2019 · 3 comments · Fixed by #7477
Closed
Labels
auto-locked Outdated issues that have been locked by automation state: needs discussion This needs some more discussion type: bug A confirmed bug or unintended behavior

Comments

@cjerdonek
Copy link
Member

It was reported in issue #6634 that when building a wheel using (PEP 517), a traceback displayed when setup.py clean failed was unneeded.

Excerpt:

  Running `pyo3-pack build -i python --no-sdist --bindings=cffi`
  Error: Command '['pyo3-pack', 'build', '-i', 'python', '--no-sdist', '--bindings=cffi']' returned non-zero exit status 1.
  Building wheel for cffi-pure (PEP 517) ... error
  ERROR: Failed building wheel for cffi-pure
  Running setup.py clean for cffi-pure
  Running command /home/konsti/pyo3-pack/venv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-req-build-sphjswqi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named 'setuptools'
  ERROR: Failed cleaning build dir for cffi-pure
Failed to build cffi-pure
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jun 24, 2019
@pradyunsg
Copy link
Member

pradyunsg commented Jun 24, 2019

👀

You don't have to explain what happened here, but it'd be nice if you do. 😛

@cjerdonek cjerdonek reopened this Jun 24, 2019
@cjerdonek
Copy link
Member Author

I closed this after creating it because when I looked at the code, it seemed like the traceback only displays when verbose mode is enabled, in which case it doesn't really seem like an issue (it's verbose mode). But I'm not 100% sure, so I'll leave it open for completeness for now.

@chrahunt
Copy link
Member

chrahunt commented Dec 8, 2019

This looks like a bug, unless I'm missing something.

  1. pep517 build takes place
  2. _build_one_pep517 returns None on exception
  3. if wheel is None, then execute _clean_one
  4. unconditionally execute setup.py clean and log exceptions at error level

@chrahunt chrahunt added state: needs discussion This needs some more discussion type: bug A confirmed bug or unintended behavior labels Dec 8, 2019
@triage-new-issues triage-new-issues bot removed S: needs triage Issues/PRs that need to be triaged labels Dec 8, 2019
sbidoul added a commit to sbidoul/pip that referenced this issue Dec 13, 2019
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 1, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 1, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 1, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 2, 2020
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Feb 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation state: needs discussion This needs some more discussion type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants