Skip to content

Commit 93ba296

Browse files
committed
pip: Allow overriding system_packages list with ignore-installed arg
`flatpak-pip-generator --ignore-installed pip pip` will now generate an actual manifest and append `--ignore-installed` to the build command Fixes #254
1 parent ec444db commit 93ba296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pip/flatpak-pip-generator

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ for package in packages:
377377
print('Warning: skipping invalid requirement specification {} because it is missing a name'.format(package.line), file=sys.stderr)
378378
print('Append #egg=<pkgname> to the end of the requirement line to fix', file=sys.stderr)
379379
continue
380-
elif not opts.python2 and package.name.casefold() in system_packages:
380+
elif not opts.python2 and package.name.casefold() in system_packages and not package.name.casefold() in opts.ignore_installed:
381381
print(f"{package.name} is in system_packages. Skipping.")
382382
continue
383383

@@ -413,7 +413,7 @@ for package in packages:
413413
subprocess.run(pip_download + [pkg], check=True, stdout=subprocess.DEVNULL)
414414
for filename in sorted(os.listdir(tempdir)):
415415
dep_name = get_package_name(filename)
416-
if dep_name.casefold() in system_packages:
416+
if dep_name.casefold() in system_packages and not dep_name.casefold() in opts.ignore_installed:
417417
continue
418418
dependencies.append(dep_name)
419419

0 commit comments

Comments
 (0)