Skip to content

Conversation

@larsoner
Copy link
Collaborator

After #381 we starting hitting errors in CIs in MNE-Python when doing pip install -r requirements_doc.txt:

Collecting https://github.com/numpy/numpydoc/archive/main.zip (from -r requirements_doc.txt (line 3))
  Downloading https://github.com/numpy/numpydoc/archive/main.zip
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  python setup.py egg_info did not run successfully.
  exit code: 1
  
  [10 lines of output]
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-req-build-ww_dbswd\setup.py", line 6, in <module>
      from numpydoc import __version__ as version
    File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-req-build-ww_dbswd\numpydoc\__init__.py", line 30, in <module>
      _verify_sphinx_jinja()
    File "C:\Users\VssAdministrator\AppData\Local\Temp\pip-req-build-ww_dbswd\numpydoc\__init__.py", line 17, in _verify_sphinx_jinja
      import sphinx, jinja2
  ModuleNotFoundError: No module named 'sphinx'

In other words, now import numpydoc does a check having to do with Sphinx, but this is a problem because setup.py imports numpydoc, so setup.py can't be run without Sphinx present.

This works around the issue by using a _version.py, that way numpydoc doesn't have to be imported during setup.py.

@larsoner
Copy link
Collaborator Author

This is a quick hotfix for a new bug appearing in the wild and it's green so I'll go ahead and merge. But anyone feel free to review and I'm happy to revisit / revise in another PR!

@larsoner larsoner merged commit 9eb6f9b into numpy:main Apr 14, 2022
@larsoner larsoner deleted the ver branch April 14, 2022 13:22
@rossbar rossbar mentioned this pull request Apr 25, 2022
@jarrodmillman jarrodmillman added this to the 1.3.0 milestone Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants