From c537bd7e700004b5a66124c1970f4fb540a427d6 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Mon, 20 Apr 2020 10:31:05 +0200 Subject: [PATCH] fix(python): incorrect dependency on jsii (#1582) The Python runtime dependency of generated Python code was incorrectly pinning on the minor, instead of allowing the necessary semver range. Changed the dependency statement from `~=` to the correctly translated caret range. Fixes #1573 --- packages/jsii-pacmak/lib/targets/python.ts | 2 +- .../test/expected.jsii-calc-base-of-base/python/setup.py | 2 +- .../jsii-pacmak/test/expected.jsii-calc-base/python/setup.py | 2 +- .../jsii-pacmak/test/expected.jsii-calc-lib/python/setup.py | 2 +- packages/jsii-pacmak/test/expected.jsii-calc/python/setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index 8ff9478821..061dcf97f3 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -1320,7 +1320,7 @@ class Package { packages: modules.map(m => m.pythonName), package_data: packageData, python_requires: '>=3.6', - install_requires: [`jsii~=${jsiiVersionSimple}`, 'publication>=0.0.3'].concat(dependencies), + install_requires: [`jsii${toPythonVersionRange(`^${jsiiVersionSimple}`)}`, 'publication>=0.0.3'].concat(dependencies), classifiers: [ 'Intended Audience :: Developers', 'Operating System :: OS Independent', diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/python/setup.py b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/python/setup.py index 620e92abb9..188f8f4076 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/python/setup.py +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/python/setup.py @@ -30,7 +30,7 @@ }, "python_requires": ">=3.6", "install_requires": [ - "jsii~=0.0.0", + "jsii>=0.0.0, <0.0.1", "publication>=0.0.3" ], "classifiers": [ diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/python/setup.py b/packages/jsii-pacmak/test/expected.jsii-calc-base/python/setup.py index 4eee448c4c..31a67e967e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/python/setup.py +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/python/setup.py @@ -30,7 +30,7 @@ }, "python_requires": ">=3.6", "install_requires": [ - "jsii~=0.0.0", + "jsii>=0.0.0, <0.0.1", "publication>=0.0.3", "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1" ], diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/python/setup.py b/packages/jsii-pacmak/test/expected.jsii-calc-lib/python/setup.py index f18a4bf443..a0341a08d9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/python/setup.py +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/python/setup.py @@ -30,7 +30,7 @@ }, "python_requires": ">=3.6", "install_requires": [ - "jsii~=0.0.0", + "jsii>=0.0.0, <0.0.1", "publication>=0.0.3", "scope.jsii-calc-base>=0.0.0, <0.0.1", "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1" diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/python/setup.py b/packages/jsii-pacmak/test/expected.jsii-calc/python/setup.py index 32c75ca7ac..c6bc9722f4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/python/setup.py +++ b/packages/jsii-pacmak/test/expected.jsii-calc/python/setup.py @@ -39,7 +39,7 @@ }, "python_requires": ">=3.6", "install_requires": [ - "jsii~=0.0.0", + "jsii>=0.0.0, <0.0.1", "publication>=0.0.3", "scope.jsii-calc-base>=0.0.0, <0.0.1", "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1",