aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpxinwr <peixing.xin@windriver.com>2020-12-21 06:27:42 +0800
committerGitHub <noreply@github.com>2020-12-20 23:27:42 +0100
commitab74c014ae514fde7487542ec96ef45235aa86b0 (patch)
tree95f63ef81a87a9d975421287d6d0dbe1b24f4e2e /Lib/distutils/command
parentbpo-42669: Document that `except` rejects nested tuples (GH-23822) (diff)
downloadcpython-ab74c014ae514fde7487542ec96ef45235aa86b0.tar.gz
cpython-ab74c014ae514fde7487542ec96ef45235aa86b0.tar.bz2
cpython-ab74c014ae514fde7487542ec96ef45235aa86b0.zip
bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/install.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index aaa300efa96..bdead133bd3 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -17,7 +17,8 @@ from distutils.errors import DistutilsOptionError
from site import USER_BASE
from site import USER_SITE
-HAS_USER_SITE = True
+
+HAS_USER_SITE = (USER_SITE is not None)
WINDOWS_SCHEME = {
'purelib': '$base/Lib/site-packages',
@@ -169,8 +170,9 @@ class install(Command):
self.install_lib = None # set to either purelib or platlib
self.install_scripts = None
self.install_data = None
- self.install_userbase = USER_BASE
- self.install_usersite = USER_SITE
+ if HAS_USER_SITE:
+ self.install_userbase = USER_BASE
+ self.install_usersite = USER_SITE
self.compile = None
self.optimize = None
@@ -343,8 +345,9 @@ class install(Command):
# Convert directories from Unix /-separated syntax to the local
# convention.
self.convert_paths('lib', 'purelib', 'platlib',
- 'scripts', 'data', 'headers',
- 'userbase', 'usersite')
+ 'scripts', 'data', 'headers')
+ if HAS_USER_SITE:
+ self.convert_paths('userbase', 'usersite')
# Deprecated
# Well, we're not actually fully completely finalized yet: we still