Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2027 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

[PATCH] add ez_setup to repository (install setuptools if not installed by default)

Reported by: lszyba1 Owned by: faide
Priority: normal Milestone: 2.0b1
Component: TurboGears Version: trunk
Severity: major Keywords: setuptools sprint needs testing & docs
Cc:

Description

Hello, Could you add a ez_setup.py to source repository next to setup.py and add these 2 lines on the top of setup.py so that setuptools gets installed on the system without first installing it. This will reduce the number of steps to install tg2.

Please also update the docs and remove the extra step.(extra step being downloading ez_setup.py and installing setuptools)  http://www.turbogears.org/2.0/docs/main/DownloadInstall.html

Add these lines to beginning of setup.py #Gets setuptools from ez_setup import use_setuptools use_setuptools()

Thanks, Lucas

Attachments

add_ez_setup_automatic_download_of_setuptools.diff Download (622 bytes) - added by lszyba1 11 years ago.

Change History

comment:1 Changed 11 years ago by lszyba1

actually the way pylons has ot can work try:

from setuptools import setup, find_packages

except ImportError?:

from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages

Changed 11 years ago by lszyba1

comment:2 Changed 11 years ago by lszyba1

Attaching a patch for setup.py please downlaod the ez_setup.py and check it into the folder. wget  http://peak.telecommunity.com/dist/ez_setup.py

This patch will use ez_setup.py to download and install setuptools if its not installed with the system. This allows for easy installation and can work on windows as well if win32 "eggs" are available for all packages. Thanks, Lucas

comment:3 Changed 10 years ago by mramm

  • Priority changed from highest to normal
  • Milestone changed from 1.9.7b1 to 2.0b1

comment:4 Changed 10 years ago by jorge.vargas

seems reasonable any objections?

comment:5 follow-up: ↓ 6 Changed 10 years ago by jorge.vargas

  • Summary changed from add ez_setup to repository (install setuptools if not installed by default) to [PATCH] add ez_setup to repository (install setuptools if not installed by default)

comment:6 in reply to: ↑ 5 Changed 10 years ago by mramm

Replying to jorge.vargas:

Nope, seems like the right thing to do.

comment:7 Changed 10 years ago by mramm

  • Keywords sprint added

comment:8 Changed 10 years ago by jorge.vargas

  • Keywords needs testing added

committed in r5913 will someone test it on a machine without setuptools to be 100% sure, thanks.

comment:9 Changed 10 years ago by jorge.vargas

  • Keywords & docs added

As for documentation I'm not 100% sure it should be deleted, the current recommended way of installing TG is inside a virtualenv which requires setuptools, so you will still have to run ez_setup.py if you are going that way.

I think the best will be to add a line like "for convenience this file should be in your distribution", and of course for users that know what they are doing python setup.py develop,etc will now work.

comment:10 Changed 10 years ago by mramm

  • Status changed from new to closed
  • Resolution set to fixed

Yea, we should leave the docs that use virtualenv for now.

comment:11 Changed 10 years ago by lszyba1

You can test it by doing: easy_install -m setuptools

Above should remove your setuptools.

Note: See TracTickets for help on using tickets.