@@ -10,16 +10,14 @@ class { 'python' :
1010 pip => 'present',
1111 virtualenv => 'present',
1212 }
13- ->
14- python::virtualenv { 'venv' :
13+ -> python::virtualenv { 'venv' :
1514 ensure => 'present',
1615 systempkgs => false,
1716 venv_dir => '/opt/venv',
1817 owner => 'root',
1918 group => 'root',
2019 }
21- ->
22- python::pip { 'rpyc' :
20+ -> python::pip { 'rpyc' :
2321 ensure => '3.2.3',
2422 virtualenv => '/opt/venv',
2523 }
@@ -36,16 +34,14 @@ class { 'python' :
3634 pip => 'present',
3735 virtualenv => 'present',
3836 }
39- ->
40- python::virtualenv { 'venv' :
37+ -> python::virtualenv { 'venv' :
4138 ensure => 'present',
4239 systempkgs => false,
4340 venv_dir => '/opt/venv2',
4441 owner => 'root',
4542 group => 'root',
4643 }
47- ->
48- python::pip { 'pip' :
44+ -> python::pip { 'pip' :
4945 ensure => '18.0',
5046 virtualenv => '/opt/venv2',
5147 }
@@ -62,16 +58,14 @@ class { 'python' :
6258 pip => 'present',
6359 virtualenv => 'present',
6460 }
65- ->
66- python::virtualenv { 'venv' :
61+ -> python::virtualenv { 'venv' :
6762 ensure => 'present',
6863 systempkgs => false,
6964 venv_dir => '/opt/venv3',
7065 owner => 'root',
7166 group => 'root',
7267 }
73- ->
74- python::pip { 'rpyc' :
68+ -> python::pip { 'rpyc' :
7569 ensure => 'latest',
7670 virtualenv => '/opt/venv3',
7771 }
@@ -90,16 +84,14 @@ class { 'python' :
9084 pip => 'present',
9185 virtualenv => 'present',
9286 }
93- ->
94- python::virtualenv { 'venv' :
87+ -> python::virtualenv { 'venv' :
9588 ensure => 'present',
9689 systempkgs => false,
9790 venv_dir => '/opt/venv4',
9891 owner => 'root',
9992 group => 'root',
10093 }
101- ->
102- python::pip { 'Randomized_Requests' :
94+ -> python::pip { 'Randomized_Requests' :
10395 ensure => 'latest',
10496 virtualenv => '/opt/venv4',
10597 }
@@ -111,5 +103,34 @@ class { 'python' :
111103 # but probability of this happening is minimal, so it should be acceptable.
112104 apply_manifest ( pp , catch_changes : true )
113105 end
106+ it 'works with editable=>true' do
107+ pp = <<-EOS
108+ package{ 'git' :
109+ ensure => 'present',
110+ }
111+ -> class { 'python' :
112+ version => 'system',
113+ pip => 'present',
114+ virtualenv => 'present',
115+ }
116+ -> python::virtualenv { 'venv' :
117+ ensure => 'present',
118+ systempkgs => false,
119+ venv_dir => '/opt/venv5',
120+ owner => 'root',
121+ group => 'root',
122+ }
123+ -> python::pip { 'rpyc' :
124+ ensure => '4.1.0',
125+ url => 'git+https://github.com/tomerfiliba/rpyc.git',
126+ editable => true,
127+ virtualenv => '/opt/venv5',
128+ }
129+ EOS
130+
131+ # Run it twice and test for idempotency
132+ apply_manifest ( pp , catch_failures : true )
133+ apply_manifest ( pp , catch_changes : true )
134+ end
114135 end
115136end
0 commit comments