-
Notifications
You must be signed in to change notification settings - Fork 27
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
Don't try to import m2r2 during setup (fixes DistributionNotFound error) #22
base: development
Are you sure you want to change the base?
Conversation
Don't try to import m2r2 during setup, since it expects m2r2 to be installed already. Fixes the following error during pip install: pkg_resources.DistributionNotFound: The 'm2r2' distribution was not found and is required by the application
Hi @kalvdans, sorry for leaving this open for so long. I have not been able to replicate any errors installing with If this error persists and you can provide extra info on how to replicate, feel free to reopen. I'm closing this to focus on other PRs. |
Sorry to not give enough information. I could reproduce today on Ubuntu 20.04.2:
|
Can you try with Also, what are the outputs of |
|
I've been able to replicate it by creating a new virtualenv, which has by default |
from m2r2 import parse_from_file | ||
|
||
readme = parse_from_file(readme_file) | ||
except ImportError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer something like:
+except (ImportError, DistributionNotFound):
with the matching import from pkg_resources
. This way, it's less of a change, if that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense that the package have different description based on your build environment. Maybe we should take the step to declarative style using setup.cfg
instead?
Don't try to import m2r2 during setup, since it expects m2r2 to be
installed already.
Fixes the following error during
pip install https://github.com/CrossNox/m2r2/archive/v0.2.7.zip
: