python3-venv missing ? pip3 missing in the virtualenv ?

Open
#430 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devops

Research direction

Start with the python::pyvenv and python::pip resources in the module and compare their behavior with the Debian 9.5 reproduction in the issue. Check the README guidance and verify the virtualenv can be created with pip3 available without the reported manual package addition or symlink.

Written by the indexing model from the issue text.

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.8.2
  • Ruby: 2.3.3p222
  • Distribution: debian 9.5
  • Module version: last 2.1.1

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

class { 'python' :
  version    => 'python3',
  pip        => 'present',
  dev        => 'absent',
  virtualenv => 'present',
  gunicorn   => 'absent',
}
package {'python3-venv':
ensure => present,
}->
python::pyvenv  { '/data/python/.virtualenvs' :
  ensure       => present,
  systempkgs   => true,
  owner        => 'pod',
  group        => 'pod',
}

python::pip { 'virtualenvwrapper' :
  ensure        => 'present',
  pip_provider  => 'pip3',
  pkgname       => 'virtualenvwrapper',
  proxy         => 'someproxy:3128',
  virtualenv    => '/data/python/.virtualenvs',
  owner         => 'pod',
  timeout       => 1800,
}

What are you seeing

It's probably a problem of how I use the module but I had to add

package {'python3-venv':
ensure => present,
}->

to have python::pyvenv working because i had :

Error: /Stage[main]/Main/Node[pod-web-test.grenet.fr]/Python::Pyvenv[/data/python/.virtualenvs]/Exec[python_virtualenv_/data/python/.virtualenvs]/returns: change from notrun to 0 failed: Could not find command 'pyvenv'

and I had to do a symlink of pip3 to have it in my virtualenv
ln -s /usr/bin/pip3 /data/python/.virtualenvs/bin/pip3

What am I missing in my use of the module so I don't have to do the fix I did ? I turned the readme upside down and didn't found an answer (I don't know python but I have to install a python app on my server so I'm trying to write the requierement in puppet instead of following the app's doc that explain how to do it by hand)

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.