easy_install_package remote tarball installation

On the command line I can do the following and it works!

sudo easy_install
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

The corresponding resource definition fails.

easy_install_package “
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz” do
action :install
end

INFO: Processing easy_install_package[
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
action install (graphite::default line 16)


FATAL: Chef::Exceptions::package: easy_install_package[
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
(graphite::default line 16) had an error: No version specified, and no
candidate version available for
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

Is this expected? Is there a way to install a python package this way? I
can’t seem to find one.

On Aug 9, 2011, at 12:42 PM, Kevin Nuckolls wrote:

On the command line I can do the following and it works!

sudo easy_install http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

The corresponding resource definition fails.

easy_install_package "http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz" do
action :install
end

INFO: Processing easy_install_package[http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz] action install (graphite::default line 16)
...
...
FATAL: Chef::Exceptions::package: easy_install_package[http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz] (graphite::default line 16) had an error: No version specified, and no candidate version available for http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

Is this expected? Is there a way to install a python package this way? I can't seem to find one.

There is no way to do an idempotence check on such a thing (at least not easily) since Chef can't know what version of that package is installed currently. It could potentially be improved with either a manual package name attr or an understanding of the #egg= tagging, but any such fixes would go in the pip install provider since no one should be using easy_install anymore :smiley:

--Noah

I had to use easy_install for a client who has eggs but not .tar.gz's for
some dependencies. Apparently PIP doesn't support eggs. I simply wrote an
execute resource to handle this, wasn't aware that there was an
easy_install_provider.

It looks like your syntax may be wrong, but I can't definitively find the
syntax you should be using. It's probably some variation of:

easy_install_package "whisper" do
action :install
version "0.9.8"
options "-f
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz"
end

I think there was some progress on the idempotence problem [1] that Joe
Williams did for 0.9.14. If you're using something less than that version,
you may want to upgrade.

Please post back what you find.

James

[1] http://tickets.opscode.com/browse/CHEF-1892

On Tue, Aug 9, 2011 at 1:01 PM, Noah Kantrowitz noah@coderanger.net wrote:

On Aug 9, 2011, at 12:42 PM, Kevin Nuckolls wrote:

On the command line I can do the following and it works!

sudo easy_install
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

The corresponding resource definition fails.

easy_install_package "
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz" do
action :install
end

INFO: Processing easy_install_package[
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
action install (graphite::default line 16)
...
...
FATAL: Chef::Exceptions::package: easy_install_package[
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
(graphite::default line 16) had an error: No version specified, and no
candidate version available for
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz

Is this expected? Is there a way to install a python package this way? I
can't seem to find one.

There is no way to do an idempotence check on such a thing (at least not
easily) since Chef can't know what version of that package is installed
currently. It could potentially be improved with either a manual package
name attr or an understanding of the #egg= tagging, but any such fixes would
go in the pip install provider since no one should be using easy_install
anymore :smiley:

--Noah

On Tue, Aug 9, 2011 at 3:42 PM, Kevin Nuckolls kevin.nuckolls@gmail.com wrote:

On the command line I can do the following and it works!
sudo easy_install
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz
The corresponding resource definition fails.
easy_install_package
"http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz" do
action :install
end
INFO: Processing
easy_install_package[http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
action install (graphite::default line 16)
...
...
FATAL: Chef::Exceptions::package:
easy_install_package[http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz]
(graphite::default line 16) had an error: No version specified, and no
candidate version available for
http://launchpad.net/graphite/1.0/0.9.8/+download/whisper-0.9.8.tar.gz
Is this expected? Is there a way to install a python package this way? I
can't seem to find one.

Kevin, you can work around it by checking explicitly for the egg file.

It's not very cross platform.

I got that from Darrin's graphite cookbook btw.