Skip to content

Commit

Permalink
⏪️ Remove auto-installation of setuptools and upgrading of wheel.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeares committed Aug 1, 2022
1 parent f377b05 commit e5e7e63
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

This is the current release cycle, so future features will be updated below.

### v1.1.9
### v1.1.9 – v1.1.10

- **Fixed plugins virtual environments.**
A typo in v1.1.8 temporarily broke plugins, and this patch fixes that change.
- **Fixed Meerschaum on Windows.**
A change in a previous release allowed for dist-packages for the root user (not advised but supported). The check for root (`os.geteuid()`) does not exist on Windows, so this patch accounts for that behavior.
- **Added `wheel` and `setuptools` upgrades to `pip_install()`.**
In additional for automatically updating `pip`, `pip_install()` now checks for updates of `wheel` and `setuptools`.
- **Tweaked screen clearing on Windows.**
Meerschaum now always uses `clear` or `cls` on Windows instead of ANSI escape sequences.

Expand Down
4 changes: 1 addition & 3 deletions docs/mkdocs/news/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

This is the current release cycle, so future features will be updated below.

### v1.1.9
### v1.1.9 – v1.1.10

- **Fixed plugins virtual environments.**
A typo in v1.1.8 temporarily broke plugins, and this patch fixes that change.
- **Fixed Meerschaum on Windows.**
A change in a previous release allowed for dist-packages for the root user (not advised but supported). The check for root (`os.geteuid()`) does not exist on Windows, so this patch accounts for that behavior.
- **Added `wheel` and `setuptools` upgrades to `pip_install()`.**
In additional for automatically updating `pip`, `pip_install()` now checks for updates of `wheel` and `setuptools`.
- **Tweaked screen clearing on Windows.**
Meerschaum now always uses `clear` or `cls` on Windows instead of ANSI escape sequences.

Expand Down
2 changes: 1 addition & 1 deletion meerschaum/config/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Specify the Meerschaum release version.
"""

__version__ = "1.1.9"
__version__ = "1.1.10"
16 changes: 2 additions & 14 deletions meerschaum/utils/packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,11 +751,7 @@ def pip_install(
else:
ANSI, UNICODE = False, False
if check_wheel:
have_wheel = (
venv_contains_package('wheel', venv=venv, debug=debug)
and
venv_contains_package('setuptools', venv=venv, debug=debug)
)
have_wheel = venv_contains_package('wheel', venv=venv, debug=debug)
_args = list(args)
have_pip = venv_contains_package('pip', venv=venv, debug=debug)
import sys
Expand Down Expand Up @@ -787,21 +783,13 @@ def pip_install(
pip = attempt_import('pip', venv=venv, install=False, debug=debug, lazy=False)
if need_update(pip, check_pypi=check_pypi, debug=debug):
_args.append(all_packages['pip'])

if 'wheel' not in ' '.join(_args):
if check_update and not _uninstall and have_wheel:
wheel, setuptools = attempt_import('wheel', 'setuptools', venv=venv, install=False, debug=debug, lazy=False)
if need_update(wheel, check_pypi=check_pypi, debug=debug):
_args.append(all_packages['wheel'])
if need_update(setuptools, check_pypi=check_pypi, debug=debug):
_args.append(all_packages['setuptools'])

_args = (['install'] if not _uninstall else ['uninstall']) + _args

if check_wheel and not _uninstall:
if not have_wheel:
if not pip_install(
'wheel', 'setuptools',
'wheel',
venv=venv, deactivate=False,
check_update=False, check_pypi=False,
check_wheel=False, debug=debug,
Expand Down

0 comments on commit e5e7e63

Please sign in to comment.