System python on CentOS 8 is not "python"

Open
#529 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
centos, linux, python, ruby

Research direction

Start with the module's package-installation logic and reproduce the issue using the Puppet class shown on CentOS 8. Check how the system Python choice is translated into package names and verify the result with the reported pip and virtualenv settings. Done means system Python installs successfully on CentOS 8 and the existing system-based virtualenv workflow no longer requires version-specific overrides.

Written by the indexing model from the issue text.

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.11.1
  • Ruby: 2.5.7p206
  • Distribution: CentOS 8
  • Module version: 4.0.0

How to reproduce (e.g Puppet code you use)

        class { 'python':
                ensure => 'present',
                pip => 'present',
                virtualenv => 'present',
                use_epel => false,
        }

What are you seeing

Error: Execution of '/bin/dnf -d 0 -e 1 -y install python' returned 1: Error: Unable to find a match                                                        
Error: /Stage[main]/Python::Install/Package[python]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/dnf -d 0 -e 1 -y install python' retu
rned 1: Error: Unable to find a match                                                          

What behaviour did you expect instead

Python 2.7 is now EOL and so CentOS 8 are pushing a lot of Python 3. Because of the long lifespan of a CentOS release, they've only got versioned Python (python2 and python3) and python as a package doesn't exist.

"system" should be Python 3 on CentOS 8 (and other distros that have similar behaviour)

This would also solve the problem of installing Python as v3 (rather than system) and then having to specify v3 for all virtualenvs as well.

Dominant language
Ruby
Stars
196
Forks
372
Avg merge
1d 18m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voxpupuli/puppet-python

All issues in voxpupuli/puppet-python

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.