Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Use setuptools instead of distribute#48

Merged
coderanger merged 3 commits into
poise:masterfrom
ka2n:setuptools_0_8_x
Jul 24, 2013
Merged

Use setuptools instead of distribute#48
coderanger merged 3 commits into
poise:masterfrom
ka2n:setuptools_0_8_x

Conversation

@ka2n
Copy link
Copy Markdown
Contributor

@ka2n ka2n commented Jul 8, 2013

It seems that setuptools is updated and distribute 0.6.x is deprecated now.

@jamesonjlee
Copy link
Copy Markdown

@gondoi
Copy link
Copy Markdown

gondoi commented Jul 10, 2013

The recent changes to distribute-setup.py really caused some breaking in our environment. Is there not a preferred way to install this from pypi instead of direct raw scripts? Linking to the direct script and not locking to a specific commit is what broke this for us in the first place.

From the FAQ linked by @jamesonjlee it looks like we could simply run a easy_install -U pip setuptools, or perhaps point get_pip.py at a specific tree/commit.

UPDATE: I forgot to mention, that despite the concern around get_pip.py, this pull request works great for me and fixes all errors I was having 👍

@gondoi
Copy link
Copy Markdown

gondoi commented Jul 10, 2013

Also, the usage we have that would be a good test is to:

python_pip "supervisor" do
  action :upgrade
end

@gondoi
Copy link
Copy Markdown

gondoi commented Jul 10, 2013

@ka2n
Copy link
Copy Markdown
Contributor Author

ka2n commented Jul 11, 2013

@jamesonjlee
Thanks for the link you sent me. It was really useful!

@gondoi
Thanks for testing my code and creating the ticket. But I still wonder what should be the best way.

@jpanganiban
Copy link
Copy Markdown

👍

@christopherhan
Copy link
Copy Markdown

Also ran into this issue, and successfully using @ka2n fork in our production environment.

Comment thread recipes/pip.rb Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better condition is to just try and import setuptools

not_if "#{node['python']['binary']} -c 'import setuptools'"

@jtimberman
Copy link
Copy Markdown

Hello @ka2n,

Thank you for the pull request. Before we can merge it, we need a contributor license agreement (CLA) on file for you. More information can be found on the following wiki page:

http://wiki.opscode.com/display/chef/How+to+Contribute

Thank you,
Joshua

@ka2n
Copy link
Copy Markdown
Contributor Author

ka2n commented Jul 22, 2013

Hello @jtimberman,
Sorry for the delay in response, I've signed CLA as my real name "Katsuma Ito".

Thank you.

@sethvargo
Copy link
Copy Markdown
Contributor

@ka2n there are still a few places where you're basing the guard condition on the presence of easy_install, rather than the way @coderanger suggested. Could you please update the remaining ones? Thanks! 😄

@ka2n
Copy link
Copy Markdown
Contributor Author

ka2n commented Jul 23, 2013

@sethvargo I did not realize this. I'll fix it as soon as possible. Thanks!

@coderanger
Copy link
Copy Markdown
Member

Thanky, if you can't get to fixing it tonight I can just take care of it and do the release magics :-)

@ka2n
Copy link
Copy Markdown
Contributor Author

ka2n commented Jul 23, 2013

the remaining places is this?

remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
  source node['python']['setuptools_script_url']
  mode "0644"
  not_if { ::File.exists?(ez_binary) }
end

@coderanger Thanks you. I just woke up 😮 I'll fix this, but could you tell me above?

@coderanger
Copy link
Copy Markdown
Member

Yep, same thing of you can use import setuptools as a check to see if we need to do the install. Then you can remove all the stuff related to ez_binary too, since it shouldn't be needed in general.

@ka2n
Copy link
Copy Markdown
Contributor Author

ka2n commented Jul 24, 2013

@coderanger, @sethvargo
Sorry to make you wait. I learned a lot. Thanks!

@rgbkrk
Copy link
Copy Markdown
Contributor

rgbkrk commented Jul 24, 2013

👍

coderanger added a commit that referenced this pull request Jul 24, 2013
Use setuptools instead of distribute
@coderanger coderanger merged commit 488d653 into poise:master Jul 24, 2013
@ka2n ka2n deleted the setuptools_0_8_x branch July 25, 2013 00:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants