mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 20:06:35 +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__))
|
os.path.dirname(os.path.realpath(dpaste.__file__))
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set the variable root to $VIRTUALENV/var.
|
|
||||||
PYTHON_BIN = os.path.dirname(sys.executable)
|
PYTHON_BIN = os.path.dirname(sys.executable)
|
||||||
|
if os.path.exists(os.path.join(PYTHON_BIN, 'activate_this.py')):
|
||||||
VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
|
# Assume that the presence of 'activate_this.py' in the python bin/
|
||||||
if not os.path.exists(VAR_ROOT):
|
# directory means that we're running in a virtual environment. Set the
|
||||||
os.mkdir(VAR_ROOT)
|
# 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
|
# Generic Django project settings
|
||||||
|
|
Loading…
Reference in a new issue