diff --git a/examples/gunicorn.pp b/examples/gunicorn.pp index 9308f000..c83a8224 100644 --- a/examples/gunicorn.pp +++ b/examples/gunicorn.pp @@ -1,7 +1,6 @@ class { 'python': - version => 'system', - dev => true, - virtualenv => true, + version => 'system', + dev => true, } python::gunicorn { 'vhost': diff --git a/examples/init.pp b/examples/init.pp index 4c51cc80..ab934fa9 100644 --- a/examples/init.pp +++ b/examples/init.pp @@ -1,5 +1,4 @@ class { 'python': - version => 'system', - dev => true, - virtualenv => true, + version => 'system', + dev => true, } diff --git a/examples/pip.pp b/examples/pip.pp index f0db1728..a65be945 100644 --- a/examples/pip.pp +++ b/examples/pip.pp @@ -1,7 +1,6 @@ class { 'python': - version => 'system', - dev => true, - virtualenv => true, + version => 'system', + dev => true, } python::pip { 'flask': diff --git a/examples/requirements.pp b/examples/requirements.pp index 90dccd8b..4dcf289e 100644 --- a/examples/requirements.pp +++ b/examples/requirements.pp @@ -1,7 +1,6 @@ class { 'python': - version => 'system', - dev => true, - virtualenv => true, + version => 'system', + dev => true, } python::requirements { '/var/www/project1/requirements.txt': diff --git a/examples/virtualenv.pp b/examples/virtualenv.pp deleted file mode 100644 index da5ab57c..00000000 --- a/examples/virtualenv.pp +++ /dev/null @@ -1,13 +0,0 @@ -class { 'python': - version => 'system', - dev => true, - virtualenv => true, -} - -python::virtualenv { '/var/www/project1': - ensure => present, - version => 'system', - requirements => '/var/www/project1/requirements.txt', - proxy => 'http://proxy.domain.com:3128', - systempkgs => true, -} diff --git a/lib/facter/virtualenv_version.rb b/lib/facter/virtualenv_version.rb deleted file mode 100644 index c8bfdab3..00000000 --- a/lib/facter/virtualenv_version.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# Make virtualenv version available as a fact - -Facter.add('virtualenv_version') do - setcode do - if Facter::Util::Resolution.which('virtualenv') - results = Facter::Util::Resolution.exec('virtualenv --version 2>&1').match(%r{(\d+\.\d+\.?\d*).*$}) - results[1] if results - end - end -end diff --git a/manifests/params.pp b/manifests/params.pp index 6650bfaf..e69d4c43 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,7 +12,6 @@ $ensure = 'present' $pip = 'present' $dev = 'absent' - $virtualenv = 'absent' $venv = 'absent' $gunicorn = 'absent' $manage_gunicorn = true diff --git a/metadata.json b/metadata.json index bdfdb6c5..fb6434c7 100644 --- a/metadata.json +++ b/metadata.json @@ -2,16 +2,14 @@ "name": "puppet-python", "version": "6.2.2-rc0", "author": "Vox Pupuli", - "summary": "Python Module", + "summary": "Puppet module for Python", "license": "Apache-2.0", "source": "https://github.com/voxpupuli/puppet-python.git", "project_page": "https://github.com/voxpupuli/puppet-python", "issues_url": "https://github.com/voxpupuli/puppet-python/issues", - "description": "Puppet module for Python", "tags": [ "python", "pip", - "virtualenv", "gunicorn" ], "operatingsystem_support": [ diff --git a/spec/unit/facter/virtualenv_version_spec.rb b/spec/unit/facter/virtualenv_version_spec.rb deleted file mode 100644 index a6298c1f..00000000 --- a/spec/unit/facter/virtualenv_version_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -describe Facter::Util::Fact do - before do - Facter.clear - end - - let(:virtualenv_old_version_output) do - <<~EOS - 12.0.7 - EOS - end - - let(:virtualenv_new_version_output) do - <<~EOS - virtualenv 20.0.17 from /opt/python/lib/python3.5/site-packages/virtualenv/__init__.py - EOS - end - - describe 'virtualenv_version old' do - context 'returns virtualenv version when virtualenv present' do - it do - allow(Facter::Util::Resolution).to receive(:which).with('virtualenv').and_return(true) - allow(Facter::Util::Resolution).to receive(:exec).with('virtualenv --version 2>&1').and_return(virtualenv_old_version_output) - expect(Facter.value(:virtualenv_version)).to eq('12.0.7') - end - end - - context 'returns nil when virtualenv not present' do - it do - allow(Facter::Util::Resolution).to receive(:which).with('virtualenv').and_return(false) - expect(Facter.value(:virtualenv_version)).to eq(nil) - end - end - end - - describe 'virtualenv_version new' do - context 'returns virtualenv version when virtualenv present' do - it do - allow(Facter::Util::Resolution).to receive(:which).with('virtualenv').and_return(true) - allow(Facter::Util::Resolution).to receive(:exec).with('virtualenv --version 2>&1').and_return(virtualenv_new_version_output) - expect(Facter.value(:virtualenv_version)).to eq('20.0.17') - end - end - end -end