question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] setuptools 58.5 breaks installation of docutils==0.10.0

See original GitHub issue

setuptools version

58.5.{0,1}

Python version

3.9

OS

Arch Linux

Additional environment information

No response

Description

Installing docutils==0.10 in a clean venv with setuptools 58.5.{0,1} fails with an internal(?) AttributeError.

Expected behavior

Successful installation.

How to Reproduce

python -mvenv /tmp/testenv && source /tmp/testenv/bin/activate &&
  pip install -U pip setuptools wheel && pip install docutils==0.10

(To repro the issue, you may need to pip cache purge first if you happen to already have a wheel for docutils==0.10 in your pip cache.)

Output

  ERROR: Command errored out with exit status 1:
   command: /tmp/testenv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r8b4xqgi/docutils_459783958fce4136b27e3bc6ec961dba/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r8b4xqgi/docutils_459783958fce4136b27e3bc6ec961dba/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_qz_txff
       cwd: /tmp/pip-install-r8b4xqgi/docutils_459783958fce4136b27e3bc6ec961dba/
  Complete output (35 lines):
  running egg_info
  creating /tmp/pip-pip-egg-info-_qz_txff/docutils.egg-info
  writing /tmp/pip-pip-egg-info-_qz_txff/docutils.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-_qz_txff/docutils.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-_qz_txff/docutils.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-_qz_txff/docutils.egg-info/SOURCES.txt'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-r8b4xqgi/docutils_459783958fce4136b27e3bc6ec961dba/setup.py", line 221, in <module>
      do_setup()
    File "/tmp/pip-install-r8b4xqgi/docutils_459783958fce4136b27e3bc6ec961dba/setup.py", line 98, in do_setup
      dist = setup(**kwargs)
    File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 299, in run
      self.find_sources()
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 306, in find_sources
      mm.run()
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 541, in run
      self.add_defaults()
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 578, in add_defaults
      sdist.add_defaults(self)
    File "/usr/lib/python3.9/distutils/command/sdist.py", line 226, in add_defaults
      self._add_defaults_python()
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/sdist.py", line 113, in _add_defaults_python
      self._add_data_files(self._safe_data_files(build_py))
    File "/tmp/testenv/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 621, in _safe_data_files
      return build_py.get_data_files_without_manifest()
    File "/usr/lib/python3.9/distutils/cmd.py", line 103, in __getattr__
      raise AttributeError(attr)
  AttributeError: get_data_files_without_manifest
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/66/40/2b11ec2ec96d527ef933332a5847cc90860fd8bbee46da2cc468794ea25b/docutils-0.10.tar.gz#sha256=370624e61b6773da2f2fb17cc2a4eaea4bb596c3585d13f75ff193c1c738603e (from https://pypi.org/simple/docutils/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement docutils==0.10 (from versions: 0.3, 0.3.5, 0.3.7, 0.3.9, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.9, 0.9.1, 0.10, 0.11, 0.12, 0.13.1, 0.14rc1, 0.14rc2, 0.14, 0.15, 0.15.1.post1, 0.15.2, 0.16b0.dev0, 0.16rc1, 0.16, 0.17b1, 0.17, 0.17.1b1.dev0, 0.17.1, 0.18b1, 0.18)
ERROR: No matching distribution found for docutils==0.10

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:21
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

13reactions
abravalhericommented, Nov 4, 2021

Guys, I submitted a PR with a fix for that, let’s see what the maintainers think.

However if anyone wants to contribute with other unit tests, that would be awesome! (so we prevent changes like this to break existing packages in the future)

Some people suggested trying to install entire packages directly, but I am afraid that would be a kind of integration test that needs more discussion. I also asked about this approach in the PR.

7reactions
jerryz1982commented, Nov 4, 2021

breaks pycrypto too

Read more comments on GitHub >

github_iconTop Results From Across the Web

setuptools 3.7.1 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >
Debian Bug report logs: Bugs in package python-setuptools in ...
You might like to refer to the python-setuptools package page, to the Package Tracking ... python-setuptools: setup.py crashes when there is a syntax...
Read more >
2. Writing the Setup Script — Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the...
Read more >
Python 3: ImportError "No Module named Setuptools"
Here is a question about the differences between them. To install setuptools on Debian: sudo apt-get install python3-setuptools. For an older version of...
Read more >
ImportError gives confusing message if setuptools is missing
Bug 387253 - dev-python/docutils - ImportError gives confusing ... -0600 +++ setup.py 2011-10-15 17:39:44.183012148 -0600 @@ -6,7 +6,7 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found