summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorpxinwr <peixing.xin@windriver.com>2020-12-20 22:27:42 (GMT)
committerGitHub <noreply@github.com>2020-12-20 22:27:42 (GMT)
commitab74c014ae514fde7487542ec96ef45235aa86b0 (patch)
tree95f63ef81a87a9d975421287d6d0dbe1b24f4e2e /Lib/distutils/command
parentc95f8bc2700b42f4568886505a819816c9b0ba28 (diff)
downloadcpython-ab74c014ae514fde7487542ec96ef45235aa86b0.zip
cpython-ab74c014ae514fde7487542ec96ef45235aa86b0.tar.gz
cpython-ab74c014ae514fde7487542ec96ef45235aa86b0.tar.bz2
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 aaa300e..bdead13 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