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

Fix failing Windows documentation build #3968

Closed
cooperlees opened this issue Oct 23, 2023 · 1 comment
Closed

Fix failing Windows documentation build #3968

cooperlees opened this issue Oct 23, 2023 · 1 comment
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: bug Something isn't working

Comments

@cooperlees
Copy link
Collaborator

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

Expected behavior

We build the docs on Windows.

@cooperlees cooperlees added T: bug Something isn't working C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases labels Oct 23, 2023
@JelleZijlstra
Copy link
Collaborator

The GitHub gods fixed it for us. (Or maybe we fixed it by reverting to 3.11 for some CI stuff?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants