Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Make Python 3 based installs work
Browse files Browse the repository at this point in the history
This moves to my fork of puppet-python as it contains a fix for
working with virtualenv >= 20. Otherwise this is just poking
puppet-python to cope with Fedora 33 *only* having Python 3,
which it makes it available as both `python` and `python3`.

See voxpupuli/puppet-python#578 for the
aforementioned virtualenv fix.
  • Loading branch information
PeterJCLaw committed Oct 31, 2020
1 parent a4c44da commit 4b8e9a4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
url = https://github.com/puppetlabs/puppetlabs-inifile
[submodule "modules/python"]
path = modules/python
url = https://github.com/voxpupuli/puppet-python
url = https://github.com/PeterJCLaw/puppet-python
2 changes: 1 addition & 1 deletion modules/python
Submodule python updated 55 files
+2 −2 .fixtures.yml
+115 −31 .github/CONTRIBUTING.md
+3 −0 .github/SECURITY.md
+2 −1 .msync.yml
+1 −1 .overcommit.yml
+3 −545 .rubocop.yml
+3 −4 .sync.yml
+61 −67 .travis.yml
+102 −59 CHANGELOG.md
+1 −1 Dockerfile
+6 −41 Gemfile
+40 −0 REFERENCE.md
+14 −42 Rakefile
+20 −3 lib/facter/pip_version.rb
+2 −1 lib/facter/virtualenv_version.rb
+0 −2 manifests/config.pp
+1 −1 manifests/dotfile.pp
+0 −1 manifests/gunicorn.pp
+17 −16 manifests/init.pp
+41 −37 manifests/install.pp
+17 −14 manifests/params.pp
+16 −13 manifests/pip.pp
+5 −2 manifests/pip/bootstrap.pp
+12 −13 manifests/pyvenv.pp
+1 −2 manifests/requirements.pp
+18 −15 manifests/virtualenv.pp
+6 −8 metadata.json
+29 −0 spec/acceptance/class_spec.rb
+6 −6 spec/acceptance/facts_test_spec.rb
+0 −13 spec/acceptance/nodesets/archlinux-2-x64.yml
+0 −10 spec/acceptance/nodesets/centos-59-x64.yml
+0 −12 spec/acceptance/nodesets/centos-64-x64-pe.yml
+0 −10 spec/acceptance/nodesets/centos-65-x64.yml
+0 −10 spec/acceptance/nodesets/debian-70rc1-x64.yml
+0 −11 spec/acceptance/nodesets/debian-73-x64.yml
+0 −11 spec/acceptance/nodesets/default.yml
+0 −31 spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml
+0 −34 spec/acceptance/nodesets/ec2/image_templates.yaml
+0 −29 spec/acceptance/nodesets/ec2/rhel-73-x64.yml
+0 −29 spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml
+0 −29 spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml
+0 −29 spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml
+0 −10 spec/acceptance/nodesets/ubuntu-server-10044-x64.yml
+0 −10 spec/acceptance/nodesets/ubuntu-server-12042-x64.yml
+41 −19 spec/acceptance/virtualenv_spec.rb
+63 −148 spec/classes/python_spec.rb
+10 −0 spec/defines/pip_spec.rb
+10 −5 spec/defines/pyvenv_spec.rb
+28 −41 spec/defines/requirements_spec.rb
+6 −32 spec/spec_helper.rb
+4 −17 spec/spec_helper_acceptance.rb
+49 −5 spec/unit/facter/pip_version_spec.rb
+18 −25 spec/unit/facter/python_release_spec.rb
+17 −25 spec/unit/facter/python_version_spec.rb
+21 −7 spec/unit/facter/virtualenv_version_spec.rb
4 changes: 1 addition & 3 deletions modules/sr_site/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
}

class { 'python':
version => 'python3',
manage_gunicorn => false,
virtualenv => present,
}
Expand All @@ -97,9 +98,6 @@
ensure => present,
provider => 'pip3',
}
package { 'python3-virtualenv':
ensure => present,
}

class { 'sr_site::openldap':
require => File['/usr/local/var/sr'],
Expand Down
2 changes: 1 addition & 1 deletion modules/www/manifests/code_submitter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
group => 'apache',
distribute => false,
version => '3',
require => [Class['python'], Package['python3-virtualenv']],
require => Class['python'],
virtualenv => 'python3 -m virtualenv',
subscribe => Vcsrepo[$root_dir],
}
Expand Down
2 changes: 1 addition & 1 deletion modules/www/manifests/ide.pp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
distribute => false,
version => $python_version,
requirements => "${venv_dir}/lint-requirements.txt",
require => [Class['python'], Package['python3-virtualenv']],
require => Class['python'],
virtualenv => "python${$python_version} -m virtualenv",
}

Expand Down

0 comments on commit 4b8e9a4

Please sign in to comment.