Skip to content

Commit 30c0038

Browse files
committed
Render the attributes dynamically.
1 parent d622935 commit 30c0038

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

setuptools/command/easy_install.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import types
34

45
from setuptools import Command
56

@@ -10,5 +11,14 @@ class easy_install(Command):
1011
"""Stubbed command for temporary pbr compatibility."""
1112

1213

13-
ScriptWriter = _scripts.ScriptWriter
14-
sys_executable = os.environ.get("__PYVENV_LAUNCHER__", os.path.normpath(sys.executable))
14+
def __getattr__(name):
15+
attr = getattr(
16+
types.SimpleNamespace(
17+
ScriptWriter=_scripts.ScriptWriter,
18+
sys_executable=os.environ.get(
19+
"__PYVENV_LAUNCHER__", os.path.normpath(sys.executable)
20+
),
21+
),
22+
name,
23+
)
24+
return attr

0 commit comments

Comments
 (0)