Skip to content

Commit

Permalink
Add some comments about frozen distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Nov 16, 2017
1 parent 8aaf786 commit bed99da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions weasyprint/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@
level = LOGGER.level
LOGGER.setLevel(logging.ERROR)

if hasattr(sys, "frozen"):
if hasattr(sys, "_MEIPASS"):
if hasattr(sys, 'frozen'):
if hasattr(sys, '_MEIPASS'):
# Frozen with PyInstaller
# See https://github.com/Kozea/WeasyPrint/pull/540
root = sys._MEIPASS
else:
# Frozen with something else (py2exe, etc.)
# See https://github.com/Kozea/WeasyPrint/pull/269
root = os.path.dirname(sys.executable)
else:
root = os.path.dirname(__file__)
Expand Down

0 comments on commit bed99da

Please sign in to comment.