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

Always define __version__ even if get_distribution() fails #178

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

nicoddemus
Copy link
Member

In frozen executables created with tools such as pyinstaller, get_distribution() does not work because it looks for files in the environment which are not packed in the
executable.

This patch makes __version__ available in those situations, otherwise the
plugin won't work at all because plugin.py tries to import __version__
from pytest_html.__init__.

In frozen executables such as pyinstaller, get_distribution() does not work
because it looks for files in the environment which are not packed in the
executable.

This patch makes `__version__` available in those situations, otherwise the
plugin won't work at all because `plugin.py` tries to import `__version__`
from `pytest_html.__init__`.
@nicoddemus nicoddemus requested a review from davehunt September 17, 2018 17:57
@nicoddemus
Copy link
Member Author

Taking the liberty of merging Dave!

@nicoddemus nicoddemus merged commit 2671fba into pytest-dev:master Sep 19, 2018
@nicoddemus nicoddemus deleted the frozen-version branch September 19, 2018 14:09
@ssbarnea ssbarnea added packaging Packaging category bug This issue/PR relates to a bug. labels Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. packaging Packaging category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants