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

Don't try to import m2r2 during setup (fixes DistributionNotFound error) #22

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
from distutils.core import setup

readme_file = path.join(path.dirname(path.abspath(__file__)), "README.md")
try:
from m2r2 import parse_from_file

readme = parse_from_file(readme_file)
except ImportError:
Copy link
Owner

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.

Copy link
Author

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?

with open(readme_file) as f:
readme = f.read()
with open(readme_file) as f:
readme = f.read()


__version__ = "0.2.5"
Expand Down