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

Add support for use when frozen #269

Merged
merged 2 commits into from
Sep 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions weasyprint/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from __future__ import division, unicode_literals
import os.path
import logging
import sys
import re

from .css import get_child_text
Expand All @@ -33,8 +34,11 @@
level = LOGGER.level
LOGGER.setLevel(logging.ERROR)

HTML5_UA_STYLESHEET = CSS(
filename=os.path.join(os.path.dirname(__file__), 'css', 'html5_ua.css'))
if hasattr(sys, "frozen"):
root = os.path.dirname(sys.executable)
else:
root = os.path.dirname(__file__)
HTML5_UA_STYLESHEET = CSS(filename=os.path.join(root, 'css', 'html5_ua.css'))

LOGGER.setLevel(level)

Expand Down