Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pip warnings/checks during requires install #1375

Merged
merged 1 commit into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1375.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To avoid spurious warnings, pip's version check warnings were disabled while installing an app's requirements.
2 changes: 2 additions & 0 deletions src/briefcase/commands/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ def _install_app_requirements(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down
18 changes: 18 additions & 0 deletions tests/commands/create/test_install_app_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def test_app_packages_valid_requires(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -172,6 +174,8 @@ def test_app_packages_valid_requires_no_support_package(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -216,6 +220,8 @@ def test_app_packages_invalid_requires(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -267,6 +273,8 @@ def test_app_packages_offline(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -320,6 +328,8 @@ def test_app_packages_install_requirements(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -383,6 +393,8 @@ def test_app_packages_replace_existing_requirements(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -671,6 +683,8 @@ def test_app_packages_test_requires(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -715,6 +729,8 @@ def test_app_packages_test_requires_test_mode(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down Expand Up @@ -762,6 +778,8 @@ def test_app_packages_only_test_requires_test_mode(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={app_packages_path}",
Expand Down
2 changes: 2 additions & 0 deletions tests/platforms/iOS/xcode/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def test_extra_pip_args(create_command, first_app_generated, tmp_path):
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={tmp_path / 'base_path' / 'build' / 'first-app' / 'ios' / 'xcode' / 'app_packages'}",
Expand Down
2 changes: 2 additions & 0 deletions tests/platforms/iOS/xcode/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def test_extra_pip_args(update_command, first_app_generated, tmp_path):
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={tmp_path / 'base_path' / 'build' / 'first-app' / 'ios' / 'xcode' / 'app_packages'}",
Expand Down
6 changes: 6 additions & 0 deletions tests/platforms/linux/test_LocalRequirementsMixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def test_install_app_requirements_in_docker(create_command, first_app_config, tm
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
"--target=/app/path/to/app_packages",
Expand Down Expand Up @@ -230,6 +232,8 @@ def test_install_app_requirements_no_docker(
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
f"--target={tmp_path}/base_path/build/first-app/tester/dummy/path/to/app_packages",
Expand Down Expand Up @@ -341,6 +345,8 @@ def build_sdist(*args, **kwargs):
"-m",
"pip",
"install",
"--disable-pip-version-check",
"--no-python-version-warning",
"--upgrade",
"--no-user",
"--target=/app/path/to/app_packages",
Expand Down
Loading