Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Fix editable --user installs with build isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion committed Mar 5, 2022
1 parent e8ad85b commit 1f37a90
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,8 @@ def initialize_options(self):
self.install_data = None
self.install_base = None
self.install_platbase = None
if site.ENABLE_USER_SITE:
self.install_userbase = site.USER_BASE
self.install_usersite = site.USER_SITE
else:
self.install_userbase = None
self.install_usersite = None
self.install_userbase = site.USER_BASE
self.install_usersite = site.USER_SITE
self.no_find_links = None

# Options not specifiable via command line
Expand Down Expand Up @@ -253,11 +249,9 @@ def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME
getattr(sys, 'windir', '').replace('.', ''),
)

if site.ENABLE_USER_SITE:
self.config_vars['userbase'] = self.install_userbase
self.config_vars['usersite'] = self.install_usersite

elif self.user:
self.config_vars['userbase'] = self.install_userbase
self.config_vars['usersite'] = self.install_usersite
if self.user and not site.ENABLE_USER_SITE:
log.warn("WARNING: The user site-packages directory is disabled.")

self._fix_install_dir_for_user_site()
Expand Down Expand Up @@ -373,7 +367,7 @@ def _fix_install_dir_for_user_site(self):
"""
Fix the install_dir if "--user" was used.
"""
if not self.user or not site.ENABLE_USER_SITE:
if not self.user:
return

self.create_home_path()
Expand Down

0 comments on commit 1f37a90

Please sign in to comment.