- execute "pip-uninstall-#{name}" do
- command "pip uninstall #{new_resource.package_name}"
- only_if "pip show #{new_resource.package_name}"
+ execute "pip-uninstall-#{new_resource.package_name}" do
+ command "#{pip_command} uninstall #{new_resource.package_name}"
+ only_if "#{pip_command} show #{new_resource.package_name}"
+ end
+end
+
+action_class do
+ def pip_command
+ "pip#{new_resource.python_version}"