From 0f389378cecadec9e4372176e0e614132403b331 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 21:38:44 +0000 Subject: [PATCH 1/2] chore(deps-dev): Bump pip in /packages/jsii-pacmak/test/generated-code Bumps [pip](https://github.com/pypa/pip) from 23.0.1 to 23.1.2. - [Release notes](https://github.com/pypa/pip/releases) - [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/23.0.1...23.1.2) --- updated-dependencies: - dependency-name: pip dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/jsii-pacmak/test/generated-code/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c2deca4be8d1f1faec74831fc1b00c19250177e0 Mon Sep 17 00:00:00 2001 From: corymhall <43035978+corymhall@users.noreply.github.com> Date: Fri, 12 May 2023 10:24:54 -0400 Subject: [PATCH 2/2] fixing based on changes to pip version --- packages/jsii-pacmak/test/generated-code/harness.ts | 6 ++++++ .../jsii-pacmak/test/generated-code/python-pyright.test.ts | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) 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... });