poise / python

THIS COOKBOOK IS DEPRECATED – Chef cookbook to install Python and related tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to install both Python 2 and Python 3?

fletchowns opened this issue · comments

I'm using this cookbook to install Python 2.7.8 from source. Now I also need to install Python 3.4.2. How can I use this cookbook to install both versions in the same converge?

Unfortunately you've found one of the limitations of the current cookbook. Because Chef recipes are effectively singletons (they can only be run once) you can only use a given recipe one time. A cheap trick is to copy the cookbook and rewrite all include_recipe and attribute usage inside it, but that's painful and basically means forking the cookbook anyway. In a future version this could be addressed by moving to a resource-based style as my current cookbooks use, but there are no specific plans for that at this time.