mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +11:00
Reset to 'standard' folders
This commit is contained in:
parent
451b9e9ada
commit
bea1aa811a
1 changed files with 11 additions and 5 deletions
|
@ -13,12 +13,18 @@ PROJECT_DIR, PROJECT_MODULE_NAME = os.path.split(
|
|||
os.path.dirname(os.path.realpath(dpaste.__file__))
|
||||
)
|
||||
|
||||
# Set the variable root to $VIRTUALENV/var.
|
||||
PYTHON_BIN = os.path.dirname(sys.executable)
|
||||
|
||||
VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
|
||||
if not os.path.exists(VAR_ROOT):
|
||||
os.mkdir(VAR_ROOT)
|
||||
if os.path.exists(os.path.join(PYTHON_BIN, 'activate_this.py')):
|
||||
# Assume that the presence of 'activate_this.py' in the python bin/
|
||||
# directory means that we're running in a virtual environment. Set the
|
||||
# variable root to $VIRTUALENV/var.
|
||||
VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
|
||||
if not os.path.exists(VAR_ROOT):
|
||||
os.mkdir(VAR_ROOT)
|
||||
else:
|
||||
# Set the variable root to the local configuration location (which is
|
||||
# ignored by the repository).
|
||||
VAR_ROOT = os.path.join(PROJECT_DIR, PROJECT_MODULE_NAME, 'conf', 'local')
|
||||
|
||||
#==============================================================================
|
||||
# Generic Django project settings
|
||||
|
|
Loading…
Reference in a new issue