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 #2169 (closed task: migrated)

Opened 10 years ago

Last modified 8 years ago

Migrating turbogears to pip

Reported by: jorge.vargas Owned by: jorge.vargas
Priority: normal Milestone: 2.2
Component: TurboGears Version: trunk
Severity: normal Keywords: needs tests
Cc:

Description (last modified by jorge.vargas) (diff)

Pip is the brand new thing  http://pip.openplans.org if done right we could get rid of all the indexes.

Objectives

  • eliminate private indexes
  • eliminate easy_install
  • much better debugging
  • installable previous versions of TG
  • nicer UI
  • all other pip goodness (hg,svn,git,bzr install, etc.)

Change History

comment:1 Changed 10 years ago by jorge.vargas

  • Milestone set to 2.0

comment:2 Changed 10 years ago by jorge.vargas

  • Description modified (diff)

comment:3 Changed 10 years ago by jorge.vargas

  • Keywords needs tests added
  • Priority changed from high to highest
  • Description modified (diff)
  • Summary changed from Investigate migrating turbogears to pip to Migrating turbogears to pip

comment:4 Changed 10 years ago by jorge.vargas

install

virtualenv --no-site-packages tg1pip cd tg1pip source bin/activate pip -E . install turbogears

Extremes fails to build (pip install)

problem

Assumes ez_setup is installed

fix

patch, delete those 2 lines, real patch try/catch like tg does.

PEAK-Rules bad url (pip freeze)

problem

Unreleased version and bad info to point to the trunk

couldn't find svn link for PEAK-Rules==0.5a1.dev-r2582

fix

point  http://pypi.python.org/pypi/PEAK-Rules/ to be  http://svn.eby-sarna.com/PEAK-Rules/?

2582 is trunk 2501 is 0.5a1

Conclusion

Never use easy_install with tg1 again!

tg1 package SpammCan?

$ pip -E . install -e svn+svn://chrisarndt.de/projects/SpammCan/trunk

problem

turbogears1 loading webob due to some weirdness... and entrypoints. who is saying that webob is a

  Running setup.py egg_info for package SpammCan
    /home/elpargo/tg/tg1pip/lib/python2.5/site-packages/cherrypy/lib/profiler.py:54: UserWarning: Your installation of Python doesn't have a profile module. If you're on Debian, you can apt-get python2.4-profiler from non-free in a separate step. See http://www.cherrypy.org/wiki/ProfilingOnDebian for details.
      warnings.warn(msg)
    Traceback (most recent call last):
      File "<string>", line 13, in <module>
      File "/home/elpargo/tg/tg1pip/src/spammcan/setup.py", line 4, in <module>
        from turbogears.finddata import find_package_data
      File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/turbogears/__init__.py", line 21, in <module>
        ext = entrypoint.load()
      File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1912, in load
      File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1925, in require
      File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 524, in resolve
    pkg_resources.DistributionNotFound: WebOb
    Complete output from command python setup.py egg_info:
    /home/elpargo/tg/tg1pip/lib/python2.5/site-packages/cherrypy/lib/profiler.py:54: UserWarning: Your installation of Python doesn't have a profile module. If you're on Debian, you can apt-get python2.4-profiler from non-free in a separate step. See http://www.cherrypy.org/wiki/ProfilingOnDebian for details.

  warnings.warn(msg)

Traceback (most recent call last):

  File "<string>", line 13, in <module>

  File "/home/elpargo/tg/tg1pip/src/spammcan/setup.py", line 4, in <module>

    from turbogears.finddata import find_package_data

  File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/turbogears/__init__.py", line 21, in <module>

    ext = entrypoint.load()

  File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1912, in load

  File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1925, in require

  File "/home/elpargo/tg/tg1pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 524, in resolve

pkg_resources.DistributionNotFound: WebOb

offending code

extensions = pkg_resources.iter_entry_points("turbogears.extensions")
for entrypoint in extensions:
    ext = entrypoint.load()
    if hasattr(ext, "tgsymbols"):
        globals().update(ext.tgsymbols())

fix

Nothing yet

comment:5 Changed 10 years ago by jorge.vargas

install turbogears2

 virtualenv --no-site-packages tg2pip
 cd tg2pip
 source bin/activate
 pip -E . install turbogears2 -i http://www.turbogears.org/2.0/downloads/current/index

repoze.who.plugins.sa fails to compile (pip install)

problem

it thinks ez_setup is installed

fix

patch it with try/catch or delete the two lines

several "badly named" svn url

problem

pip can't parse them?

Warning: cannot find svn location for repoze.what.plugins.sql==1.0a5-r3122
Warning: cannot find svn location for repoze.who.plugins.sa==1.0b2-r2909
Warning: cannot find svn location for repoze.who==1.0.10dev-r3295
Warning: cannot find svn location for ToscaWidgets==0.9.5dev-20081026

fix

not sure

install tg.devtools

pip -E . install tg.devtools -i  http://www.turbogears.org/2.0/downloads/current/index

can't find beatifulSoup

bad dependency anyway this is used by the quickstarted project

problem

not sure, missing from the index?

fix

pip -E . install BeautifulSoup?

Extremes assumes ez_setup exists

See tg1 log.

missing svn stuff (freeze)

Warning: cannot find svn location for sqlalchemy-migrate==0.5.1.dev-r479
Warning: cannot find svn location for repoze.what.plugins.sql==1.0a5-r3122
Warning: cannot find svn location for repoze.who.plugins.sa==1.0b2-r2909
Warning: cannot find svn location for repoze.who==1.0.10dev-r3295
Warning: cannot find svn location for PEAK-Rules==0.5a1.dev-r2582
Warning: cannot find svn location for ToscaWidgets==0.9.5dev-20081026
Warning: cannot find svn location for tgext.crud==0.1-r218
Warning: cannot find svn location for Catwalk==2.0-r219

fix

Same as above

paster quickstart
paster setup-app
paster serve 

All works! except some svn urls

install tgRumDemo

This is probably the most complex (dependency wise) tg2 released app So we'll get it from tip.

pip -E . install -e hg+http://hg.python-rum.org/TgRumDemo/ # fails and I don't know why
pip -E . install -e hg+http://hg.python-rum.org/TgRumDemo/#egg=TGRumDemo

works!

tgRumDemo (freeze)

works with no errors.

serve

problem

Traceback (most recent call last):
  File "/home/elpargo/tg/tg2pip/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
  File "/home/elpargo/tg/tg2pip/lib/python2.5/site-packages/paste/script/command.py", line 73, in run
    commands = get_commands()
  File "/home/elpargo/tg/tg2pip/lib/python2.5/site-packages/paste/script/command.py", line 115, in get_commands
    plugins = pluginlib.resolve_plugins(plugins)
  File "/home/elpargo/tg/tg2pip/lib/python2.5/site-packages/paste/script/pluginlib.py", line 81, in resolve_plugins
    pkg_resources.require(plugin)
  File "/home/elpargo/tg/tg2pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 626, in require
  File "/home/elpargo/tg/tg2pip/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 528, in resolve
pkg_resources.VersionConflict: (Babel 0.9.3 (/home/elpargo/tg/tg2pip/lib/python2.5/site-packages), Requirement.parse('Babel>=0.9.4'))

fix

not sure $ pip -E . install Babel won't fix it.

temp fix. rm lib/python2.5/site-packages/Babel-0.9.3-py2.5.egg-info/ -rf && pip -E . install Babel

comment:6 Changed 10 years ago by mramm

  • Milestone changed from 2.0 to 2.1

comment:7 follow-up: ↓ 8 Changed 10 years ago by mramm

Since this will require changes to several upstream packages, I don't think it can be done in time for 2.0.

comment:8 in reply to: ↑ 7 Changed 10 years ago by jorge.vargas

Replying to mramm:

Since this will require changes to several upstream packages, I don't think it can be done in time for 2.0.

I think we should provide this as "optional" in TG2.0 and show it on the docs.

As for upstream I don't think it's that hard.

  • beautifulSoup isn't a dep of tg but of quickstarted projects it will go away with #2176
  • gustavo already fixed repoze.what
  • babel was a mistake on my part, IanB corrected me on that.

So the only "hard one" is Extreme which if we can't fix we could provide a mirror or something with the fix.

comment:9 Changed 10 years ago by mramm

Ok, cool, that's easier than I thought.

I'm still a bit hesitant about switching fully over for 2.0, but if we can have this up and running I'm all for switching in 2.1 -- the only larger issue remaining is the need for a compiler to get things running on windows. I don't mind telling linux/osx people they need to download/install the free compilers that are available. But windows is a bit more complicated :(

comment:11 Changed 10 years ago by jorge.vargas

as of tg2.0b6 turbogears is pip installable

remaining issues

  • PEAK-rules which needs to be installed from svn.
  • people without a compiler (aka windows users)
  • documentation

comment:12 Changed 10 years ago by lmacken

I was unable to get pip working with the TG2 index as an --extra-index-url, like this:

  pip bundle MyBundle.pybundle -r stable-reqs.txt --extra-index-url=http://www.turbogears.org/2.0/downloads/current/index

I wrote a little patch for pip to get this working, which Ian just applied upstream::

 http://bitbucket.org/ianb/pip/changeset/6d216455e1d6/

comment:13 Changed 10 years ago by G2P

The tutorial with pip (--pip) stumbles on Extremes, because the turbogears index at  http://www.turbogears.org/2.0/downloads/current/index has Extremes 1.1, and the fix is in Extremes 1.1.1, available on PyPI.

comment:15 Changed 10 years ago by jorge.vargas

G2P is right, pje finally released that. We should update that egg in the index.

comment:16 Changed 10 years ago by percious

is anyone maintaining PIP for 2.1?

comment:17 Changed 9 years ago by percious

  • Priority changed from highest to normal

comment:18 Changed 9 years ago by mramm

  • Milestone changed from 2.1 to 2.2

comment:19 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.