diff --git a/packages/jsii-pacmak/test/generated-code/harness.ts b/packages/jsii-pacmak/test/generated-code/harness.ts index 4ca7fb43da..92098e81e1 100644 --- a/packages/jsii-pacmak/test/generated-code/harness.ts +++ b/packages/jsii-pacmak/test/generated-code/harness.ts @@ -280,10 +280,15 @@ async function runPacmak( export async function preparePythonVirtualEnv({ install = [], + installOptions = [], venvDir = __dirname, systemSitePackages = true, }: { install?: readonly string[]; + // some options like `--config-settings` should only be + // passed once. If they are passed multiple times + // then it registers as an array with multiple values + installOptions?: readonly string[]; venvDir?: string; systemSitePackages?: boolean; } = {}) { @@ -345,6 +350,7 @@ export async function preparePythonVirtualEnv({ 'pip', 'install', '--no-input', + ...installOptions, // Additional install parameters ...install, // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle diff --git a/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts index 40d29f1e60..a06a7eeb77 100644 --- a/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts +++ b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts @@ -48,11 +48,13 @@ beforeAll(async () => { install: TEST_PACKAGES.flatMap(({ moduleName }) => [ '-e', JSON.stringify(path.join(pythonSource, moduleName, TargetName.PYTHON)), + ]), + installOptions: [ // setuptools >=64 requires this // https://github.com/pypa/setuptools/issues/3518 '--config-settings', 'editable_mode=strict', - ]), + ], venvDir: pythonSource, systemSitePackages: false, // Interferes with pyright resolutions... }); diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt index f2cd70f3d0..a1c43aa24a 100644 --- a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt +++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt @@ -1,2 +1,2 @@ mypy==1.3.0 -pip==23.0.1 # required to use --config-settings +pip==23.1.2 # required to use --config-settings