Skip to content

Commit

Permalink
Update default packages (#42)
Browse files Browse the repository at this point in the history
* Upgrade pip from 24.0 to 24.2
* Remove setuptools
* Remove wheel
* Install pip without setuptools and wheel
  • Loading branch information
mattclay authored Aug 7, 2024
1 parent 5340a35 commit 8465320
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions files/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ class Pip:
)

_DEFAULT_PACKAGES = dict(
pip='24.0',
setuptools='70.0.0',
wheel='0.43.0',
pip='24.2',
)

_PACKAGES: dict[str, dict[str, str]] = {
Expand Down Expand Up @@ -89,8 +87,14 @@ def setup(self):

packages = [f'{name}=={version}' for name, version in self.packages.items()]

setup_options = [
'--break-system-packages',
'--no-setuptools',
'--no-wheel',
]

with self._install_options_context() as options:
subprocess.run(self._pip_command + options + list(self._OPTIONS) + ['--break-system-packages'] + packages, check=True, env=env)
subprocess.run(self._pip_command + options + list(self._OPTIONS) + setup_options + packages, check=True, env=env)

def show_version(self) -> None:
"""Show the pip version."""
Expand Down

0 comments on commit 8465320

Please sign in to comment.