Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Bienkowski committed Mar 5, 2022
1 parent 229b0b7 commit bed8e80
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,37 @@ def _render_version():
raise SystemExit()

def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME
def global_trace(frame, event, arg):
pass

import sys

sys.settrace(global_trace)

XXX = [set()]

def trace(frame, event, arg):
config_vars = getattr(self, 'config_vars', {})
o = {
('install_dir', self.install_dir),
('install_userbase', self.install_userbase),
('install_usersite', self.install_usersite),
('install_purelib', self.install_purelib),
('install_scripts', self.install_scripts),
('userbase', config_vars.get('userbase')),
('usersite', config_vars.get('usersite')),
}
if XXX[0] - o:
print('-', XXX[0] - o)
if o - XXX[0]:
print('+', o - XXX[0])
XXX[0] = o
lines, start = inspect.getsourcelines(frame)
print(frame.f_lineno, lines[frame.f_lineno - start])

import inspect
inspect.currentframe().f_trace = trace

self.version and self._render_version()

py_version = sys.version.split()[0]
Expand Down Expand Up @@ -453,6 +484,7 @@ def check_site_dir(self): # noqa: C901 # is too complex (12) # FIXME
instdir = normalize_path(self.install_dir)
pth_file = os.path.join(instdir, 'easy-install.pth')

print('XXX', instdir, os.path.exists(instdir))
if not os.path.exists(instdir):
try:
os.makedirs(instdir)
Expand Down

0 comments on commit bed8e80

Please sign in to comment.