opscode-cookbooks/python — pull request #15 by ampledata (2012-07-10 18:34:25+00:00)
Title: COOK-1415 Changing default Python interpreter to a more generic 'python'

In the python Cookbook there seems to be a contention in version usage:

A. The Attribute ['python']['version'] in https://github.com/opscode-cookbooks/python/blob/master/attributes/default.rb#L39
B. The Attribute :interpreter in https://github.com/opscode-cookbooks/python/blob/master/resources/virtualenv.rb#L24

Should the python_virtualenv Resource honor the the Cookbook's Default Attribute?

Per a conversation on #chef-hacking:
```
lets talk about http://tickets.opscode.com/browse/COOK-1415
what about it?
you said ping you to discuss
ok :)
what do you think, should that resource be changed to use the cookbook's attribute
no
not in the resources file
because the attribute might not be available there
due to the order in which the compoents of a cookbook are loaded.
*** timhin_ left the room (quit: Quit: timhin_).
ok, should we even propagate the version from the attributes to the resource at all
whatever method that might be
it just seems wrong to have two different defaults set
ampledata: if you want to do that in your own recipe using the resource, then you can have it
er have at it
brb
so the root of why i'm asking is this: https://github.com/opscode-cookbooks/application_python/blob/master/providers/django.rb#L98
the django resource calls python_virtualenv, without passing a python version. the default python version for python_virtualenv is 2.6, the default python version for the python cookbook is 2.7.1
maybe we should change the default python version for python_virtualenv to 2.7.1 to match the cookbook
ampledata, isn't 2.6 only for centos?
and it should be 2.7.x for non el*
idk, don't use centos
ubuntu 1204 ships with 2.7
and the much older version of the python cookbook we'd been using ships with 2.7.1 as the default
i guess i don't care as much what the default is, as long as it's consistent
ampledata: well
ampledata: what is the python binary going to be called?
is it just python?
12.04 ships with 2.7 + 3.2
sure
so perhaps, if anything, the interpreter attribute in the resource should be 'python' and not 'python26' ?
oh yeah
that's better actually
https://github.com/opscode-cookbooks/python/blob/master/providers/virtualenv.rb#L28
i'll submit a thing thing
```

JIRA: http://tickets.opscode.com/browse/COOK-1415

PLEASEREVIEW: @jtimberman @coderanger @ damm