-
Notifications
You must be signed in to change notification settings - Fork 108
Add a provider to support installing from source #58
Comments
I think this would be great! I am trying to install Python 3.5 on Ubuntu and it's not available in Source was also available on the old |
The plan is to port things over from the |
Ah thanks, I just found this in the README and was coming to post it here:
In the meantime, do you have a suggestion for getting python 3.5 installed? Perhaps I should add the |
Yep, the fallback is to install Python via your own recipe via whatever means you want, and then use the dummy provider: python_runtime '3.5' do
provider :dummy
options python_binary: '/path/to/python'
end and then everything will just work :) |
adding that dummy provider as a note in the docs would be really useful. Also, I've been working on a provider to install python from a custom Debian package that we serve from an internal repository and ran in to a really frustrating situation where the apt_package resource wouldn't use the value of the package_version key in options. Creating a copy seemed to fix it, but it took a while to figure out. If other people are trying to install custom pythons in a apt-based distribution they might run into this as well. Likely there isn't a workaround in this cookbook specifically, but wanted to put the note somewhere.
|
@dnfehren The problem is that the |
If you are using ubuntu and the
:system
provider (i.e.apt-get
), you will be relegated to the version that is in theapt-get
repositories. And theapt-get
repositories are usually behind the latest. For instance, right nowapt-cache policy python2.7
says2.7.6
is the latest version, but2.7.11
is actually the latest.Installing from
apt-get
also has the downside of not being great at installing older versions. I believe if you wanted2.7.4
, you would have to find a repo with it and add it. And this cookbook doesn't do that (which it probably shouldn't).I think installing from source solves this problem. It does have the downside of taking more time, but it'll give the ability to support a wider range of versions on ubuntu, i.e. any version that is on the python.org page. (The
:scl
provider looks like it would support a wider range of versions, but it doesn't support ubuntu and I'm not familiar enough with softwarecollections.org to know if it's easy to support ubuntu.)So, I'm thinking a
:source
provider would do the trick. The recipe for installing from source is pretty straightforward. It'll just need the version/checksums added as parameters/attributes. The more time-consuming part would likely be the testing (particularly for someone like me who isn't an expert on chef testing, but that's partially why I want to do this).Thoughts? If agreed, I will attempt to start adding the provider some time next week when I get time.
The text was updated successfully, but these errors were encountered: