summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorCarlton Gibson <carlton@noumenal.es>2021-09-01 22:09:37 +0200
committerGitHub <noreply@github.com>2021-09-01 22:09:37 +0200
commitc1d50b901b50672a46e7e5fe473c14da1616fc4e (patch)
treeeea9b185ffeca349f85c2a7ef1d693d7f6af07ac /setup.py
parent691486a5cf7588c95250a873c5b57748e82fc4c2 (diff)
downloaddjango-c1d50b901b50672a46e7e5fe473c14da1616fc4e.tar.gz
Fixed #33044 -- Reallowed editable install into user site directory.
Regression in f8f35e8c530aaf440fa8160327461460d79f6db2.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 22fc3a7a56..43a5f69365 100644
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,14 @@
import os
+import site
import sys
from distutils.sysconfig import get_python_lib
from setuptools import setup
+# Allow editable install into user site directory.
+# See https://github.com/pypa/pip/issues/7953.
+site.ENABLE_USER_SITE = '--user' in sys.argv[1:]
+
# Warn if we are installing over top of an existing installation. This can
# cause issues where files that were deleted from a more recent Django are
# still present in site-packages. See #18115.