Skip to content

Add support for CentOS 8 (python 3) #75

@mvangoor

Description

@mvangoor

🤯 Problem Statement

In CentOS 8 (RHEL 8, etc) python2 is deprecated and you should work with python 3 only. However there is no link for 'pip' to 'pip3'. This feature request is to look at the best way to disallow python 2 for centos 8 and update the places were necessary to use the native python3 / pip3 binaries.

❔ Possible Solution

I am currently working around it by doing this (requires Alternatives cookbook):

package 'python3-pip'

if node['platform_version'].to_i >= 8
  alternatives 'pip set version 3' do
    link_name 'pip'
    path '/usr/bin/pip3'
    priority 1
    action :install
  end
end

⤴️ Describe alternatives you've considered

As RHEL 8 family is quite new and adoption might be low currently I suspect not many people noticed the cookbook not working out of the box. I considered going the python2 route on rhel 8 family, but strongly feel this is the incorrect way to move forward.
Especially as I read rhel 8 family has deprecated python 2, which means it might not be as maintained as one might want.

➕ Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestEnhancement to existing functionality or new functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions