Skip to content

Commit 79ece5f

Browse files
tdowgielewiczTomasz Dowgielewicz
and
Tomasz Dowgielewicz
authored
fix: handle pip package names with inline comments during installation (#1811)
Co-authored-by: Tomasz Dowgielewicz <[email protected]>
1 parent 5da6fe1 commit 79ece5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

glob/manager_core.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,9 @@ def execute_install_script(self, url, repo_path, instant_execution=False, lazy_m
868868
package_name = remap_pip_package(line.strip())
869869
if package_name and not package_name.startswith('#') and package_name not in self.processed_install:
870870
self.processed_install.add(package_name)
871-
install_cmd = manager_util.make_pip_cmd(["install", package_name])
872-
if package_name.strip() != "" and not package_name.startswith('#'):
871+
clean_package_name = package_name.split('#')[0].strip()
872+
install_cmd = manager_util.make_pip_cmd(["install", clean_package_name])
873+
if clean_package_name != "" and not clean_package_name.startswith('#'):
873874
res = res and try_install_script(url, repo_path, install_cmd, instant_execution=instant_execution)
874875

875876
pip_fixer.fix_broken()

0 commit comments

Comments
 (0)