From f15dc6a3774615b0409c871d77b023a581d248a2 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Tue, 16 Aug 2022 14:55:51 -0700 Subject: [PATCH 1/2] we need to handle it when a package does not specify a specific version to consume --- eng/tox/create_package_and_install.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eng/tox/create_package_and_install.py b/eng/tox/create_package_and_install.py index 7bc8304a6fac..64d7eb4ff794 100644 --- a/eng/tox/create_package_and_install.py +++ b/eng/tox/create_package_and_install.py @@ -233,8 +233,13 @@ def build_and_discover_package(setuppy_path, dist_dir, target_setup, package_typ if req_specifier is None: addition_necessary = False + # if the package we're installing doesn't require a specific version (indicated by req_specifier) for the requiremeent (req_name) + # then its presence is enough. No reason to add it to necessary installations. + if req_specifier is None: + addition_necessary = False + # ...do we need to install the new version? if the existing specifier matches, we're fine - if installed_pkgs[req_name] in req_specifier: + if req_specifier is not None and installed_pkgs[req_name] in req_specifier: addition_necessary = False if addition_necessary: From b8f0e7526a722189203a43309ab5ee64cd43f9b0 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:07:04 -0700 Subject: [PATCH 2/2] properly update the condition to not be a duplicate --- eng/tox/create_package_and_install.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eng/tox/create_package_and_install.py b/eng/tox/create_package_and_install.py index 64d7eb4ff794..0c16fc6c90a8 100644 --- a/eng/tox/create_package_and_install.py +++ b/eng/tox/create_package_and_install.py @@ -233,11 +233,6 @@ def build_and_discover_package(setuppy_path, dist_dir, target_setup, package_typ if req_specifier is None: addition_necessary = False - # if the package we're installing doesn't require a specific version (indicated by req_specifier) for the requiremeent (req_name) - # then its presence is enough. No reason to add it to necessary installations. - if req_specifier is None: - addition_necessary = False - # ...do we need to install the new version? if the existing specifier matches, we're fine if req_specifier is not None and installed_pkgs[req_name] in req_specifier: addition_necessary = False