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 the version check of pip in Python packages by defining $PIP_DISABLE_PIP_VERSION_CHECK #3427

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

Flamefire
Copy link
Contributor

When invoking pip it will connect to PyPI to check if a new version is available. Not only do we not care about that but we also don't want to connect to anything external which slows down the build at best or fails at worst.

Set the environment variable to disable this in the PythonPackage constructor such that it works for any easyblock deriving from it.

A few installations where I have found a message such as:

You should consider upgrading via the '/software/rome/r23.04/Python/3.10.4-GCCcore-11.3.0/bin/python -m pip install --upgrade pip' command.

  • scipy (SciPy-bundle)
  • LAMMPS
  • TensorFlow
  • pytest-shard
  • pytest-rerunfailures

When invoking `pip` it will connect to PyPI to check if a new version is
available. Not only do we not care about that but we also don't want to
connect to anything external which slows down the build at best or fails at worst.

Set the environment variable to disable this in the PythonPackage
constructor such that it works for any easyblock deriving from it.
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Micket Micket added this to the release after 4.9.2 milestone Aug 29, 2024
@Micket
Copy link
Contributor

Micket commented Aug 29, 2024

Test report by @Micket

Overview of tested easyconfigs (in order)

  • SUCCESS cryptography-42.0.8-GCCcore-13.3.0.eb
  • SUCCESS pyproj-3.6.0-GCCcore-12.3.0.eb
  • SUCCESS Mako-1.3.5-GCCcore-13.3.0.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
vera-skylake-build - Linux Rocky Linux 8.9, x86_64, Intel Xeon Processor (Skylake, IBRS, no TSX), Python 3.6.8
See https://gist.github.com/Micket/fec912cc03eac282929641da8ca5bae5 for a full test report.

@Micket Micket merged commit b0b012e into easybuilders:develop Aug 29, 2024
41 checks passed
@Flamefire Flamefire deleted the pip-version-check branch August 29, 2024 15:08
@boegel boegel changed the title disable the version check of pip in Python packages disable the version check of pip in Python packages by defining $PIP_DISABLE_PIP_VERSION_CHECK Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants