Closed
Description
Describe the bug
CI of building black documentation on Windows fails.
- It seems we're not installing black correctly in the doc build environment:
Running Sphinx v7.2.6
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\sphinx\config.py", line 358, in eval_config_file
exec(code, namespace) # NoQA: S102
^^^^^^^^^^^^^^^^^^^^^
File "D:\a\black\black\docs\conf.py", line 46, in <module>
release = get_distribution("black").version.split("+")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\pkg_resources\__init__.py", line 528, in get_distribution
dist = get_provider(dist)
^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\pkg_resources\__init__.py", line 400, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\pkg_resources\__init__.py", line 968, in require
needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\pkg_resources\__init__.py", line 829, in resolve
dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.0\x64\Lib\site-packages\pkg_resources\__init__.py", line 870, in _resolve_dist
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'black' distribution was not found and is required by the application
To Reproduce
Trigger CI
- Example run: https://github.com/psf/black/actions/runs/6616766174/job/17971681450
Expected behavior
We build the docs on Windows.
Activity