Skip to content

Commit

Permalink
Merge pull request #4079 from MCGallaspy/windows-root-data-path-worka…
Browse files Browse the repository at this point in the history
…round

Windows root data path workaround
  • Loading branch information
aronasorman committed Jul 13, 2015
2 parents 5e311db + a833c0d commit 236b026
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions kalite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
from version import *


# Where all data is stored in a kalite installation, relative to sys.prefix
# If running kalite from source dir, you can disregard it.
ROOT_DATA_PATH = os.path.join(sys.prefix, 'share/kalite')
# ROOT_DATA_PATH should point to the directory where the source files live, including the "docs" dir
# TODO-BLOCKER(MCGallaspy): Use setuptools in the windows installer to avoid this nonsense.
ROOT_DATA_PATH = os.environ.get(
"KALITE_ROOT_DATA_PATH",
os.path.join(sys.prefix, 'share', 'kalite')
)


# TODO: Burn down this function, the name is weird, it just checks if a
Expand Down
2 changes: 1 addition & 1 deletion kalite/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@

TEMPLATE_DIRS = tuple() # will be filled recursively via INSTALLED_APPS
# libraries common to all apps
built_docs_path = os.path.join(_data_path, "sphinx-docs", "_build")
built_docs_path = os.path.join(_data_path, "docs", "_build")
if os.path.exists(built_docs_path):
STATICFILES_DIRS = (
os.path.join(_data_path, 'static-libraries'),
Expand Down

0 comments on commit 236b026

Please sign in to comment.