UNPKG

1.13 kBTypeScriptView Raw
1declare type PythonSystemPackageLookupMap = Map<string, Map<string, Map<string, Map<string, Array<string> | null>>>>;
2/**
3 * An object that looks up if any system packages are required for a Python package.
4 * The lookup is in the format {packageName: pythonVersion: systemPackageType: systemVersion: [sysPackage, sysPackage...]}
5 */
6export default class PythonSystemPackageLookup {
7 private readonly packageLookup;
8 /**
9 * @param packageLookup: PythonSystemPackageLookupMap the Map
10 */
11 constructor(packageLookup: PythonSystemPackageLookupMap);
12 /**
13 * Construct a `PythonSystemPackageLookup` by parsing a JSON representation of the package map from `path`
14 */
15 static fromFile(path: string): PythonSystemPackageLookup;
16 /**
17 * Look up the system package required for a python package given python version, package type and system version.
18 * Will always return an Array, which will be empty if there are no packages to install.
19 */
20 lookupSystemPackage(pythonPackage: string, pythonMajorVersion: number, systemPackageType: string, systemVersion: string): Array<string>;
21}
22export {};