Skip to content

Commit 23679cd

Browse files
committed
Fix setup call
1 parent 297be0e commit 23679cd

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@ def _restore_install_lib(self):
8282
self.install_lib = self.install_libbase
8383

8484

85-
setup_params = dict(
86-
cmdclass={'install': install_with_pth},
87-
package_data=package_data,
88-
)
89-
9085
if __name__ == '__main__':
9186
# allow setup.py to run from another directory
9287
# TODO: Use a proper conditional statement here
9388
here and os.chdir(here) # type: ignore[func-returns-value]
94-
dist = setuptools.setup(**setup_params)
89+
dist = setuptools.setup(
90+
cmdclass={'install': install_with_pth},
91+
package_data=package_data,
92+
)

setuptools/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def setup(
148148
verbose=True,
149149
dry_run=False,
150150
help=False,
151-
cmdclass: dict[str, type[Command]] = {},
151+
cmdclass: dict[str, type[_Command]] = {},
152152
command_packages: str | list[str] | None = None,
153153
script_name: StrPath
154154
| None = ..., # default is actually set in distutils.core.setup
@@ -167,7 +167,7 @@ def setup(
167167
scripts: list[str] | None = None,
168168
data_files: list[tuple[str, list[str]]] | None = None,
169169
password: str = '',
170-
command_obj: dict[str, Command] = {},
170+
command_obj: dict[str, _Command] = {},
171171
have_run: dict[str, bool] = {},
172172
# kwargs used directly in distutils.dist.Distribution.__init__
173173
options: Mapping[str, Mapping[str, str]] | None = None,

0 commit comments

Comments
 (0)