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

Add option to install python-setuptools #699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bastelfreak
Copy link
Member

This is required at least on Arch Linux because distutils is provided by python-setuptools, not python:

https://gitlab.archlinux.org/archlinux/packaging/packages/thefuck/-/issues/1

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@bastelfreak bastelfreak added the enhancement New feature or request label Aug 21, 2024
This is required at least on Arch Linux because distutils is provided by
python-setuptools, not python:

https://gitlab.archlinux.org/archlinux/packaging/packages/thefuck/-/issues/1
@@ -61,6 +62,7 @@
Stdlib::Absolutepath $anaconda_install_path = '/opt/python',
Boolean $manage_scl = true,
Optional[Python::Umask] $umask = undef,
Boolean $manage_setuptools = $facts['os']['family'] ? { 'Archlinux' => true, default => false, },
Copy link
Member

Choose a reason for hiding this comment

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

Could also just do

Suggested change
Boolean $manage_setuptools = $facts['os']['family'] ? { 'Archlinux' => true, default => false, },
Boolean $manage_setuptools = $facts['os']['family'] == 'Archlinux',

@@ -19,8 +19,10 @@

if facts[:os]['family'] == 'Archlinux'
it { is_expected.not_to contain_package('pip') }
it { is_expected.to contain_package('python-setuptools') }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
it { is_expected.to contain_package('python-setuptools') }
it { is_expected.to contain_package('python-distutils-extra') }

else
it { is_expected.to contain_package('pip') }
it { is_expected.not_to contain_package('python-setuptools') }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
it { is_expected.not_to contain_package('python-setuptools') }
it { is_expected.not_to contain_package('python-distutils-extra') }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants