Skip to content

Conversation

@Helveg
Copy link

@Helveg Helveg commented Feb 1, 2023

The import sphinx_reload in setup.py causes several problems:

  1. Each install requirement of sphinx_reload becomes a build requirement as well; when I do pip install -e . for example, I'm hit with a ModuleNotFoundError on the third-party import statements in sphinx_reload.py: import livereload
  2. The sphinx_reload module isn't necesarily available on the path, or it might discover another installed sphinx_reload, messing with the __version__ detection.

This PR adresses these issues by instead scanning the module line by line for a __version__ declaration, and evaluates the right hand side of the assignment statement, without importing it (1) and always finding the same file relative to setup.py (2)

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.

1 participant