[ckan-dev] setuptools versions
David Read
david.read at hackneyworkshop.com
Thu Jul 21 15:18:30 UTC 2016
Scratch my previous advice - you need to run the commands in this order:
pip uninstall distribute
pip install -U setuptools
Otherwise pip stops working and you need to reinstall setuptools using
something like:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
@Ian what setuptools/distribute are you on?
I did some more playing and you need setuptools>=11.3 to work with
repoze 2.3, that the new ckan requires. (repoze 2.0 was fine with
older setuptools). I see that this is mentioned in the setuptools
docs. I've raised an issue with repoze.who to alert them:
https://github.com/repoze/repoze.who/issues/26
But I wonder if we should add a requirement for setuptools>=11.3?
Otherwise when we release ckan again, many upgraders will get this
problem.
It's slightly complicated to add a dependency as the generation of
requirements.txt forbids it:
# The following packages are commented out because they are
# considered to be unsafe in a requirements file:
# pip # via pbr
# setuptools # via repoze.who, zope.interface
but I guess we could write a bit of code in our setup.py that does the
check and quit with a message to upgrade it if necessary.
Dave
On 21 July 2016 at 14:57, Ian Ward <ian at excess.org> wrote:
> I ran into the same error after trying to upgrade setuptools to fix an
> issue with html5lib and ckan 2.5. Instead I pinned html5lib the way we
> are on master[1] and I could run my tests again.
>
> [1]: https://github.com/ckan/ckan/blob/master/requirements.txt#L15
>
>
> On Thu, Jul 21, 2016 at 9:29 AM, David Read
> <david.read at hackneyworkshop.com> wrote:
>> Anyone else having problems with setuptools versions?
>>
>> I've been running distribute 0.6.34 (the temporary fork of setuptools)
>> for years, but then get bitten by recent changes - the newer version
>> of repoze.who I think - see exception below. Anyway I solved it by
>> upgrading setuptools to the latest (24.2.1):
>>
>> pip uninstall distribute
>> pip install -U setuptools
>>
>> I wonder if I encountered this because I'm still on ubuntu 12.04 and
>> others are on 14.04, which comes with later setuptools?
>>
>> Dave
>>
>> (ckan)vagrant at precise64:/vagrant/src/ckan$ nosetests --reset-db --ckan
>> --with-pylons=test-core.ini ckan/tests -x
>> /home/vagrant/ckan/local/lib/python2.7/site-packages/pylons/templating.py:610:
>> UserWarning: Unbuilt egg for ckan [unknown version]
>> (/vagrant/src/ckan)
>> Engine = entry_point.load()
>> Traceback (most recent call last):
>> File "/home/vagrant/ckan/bin/nosetests", line 11, in <module>
>> sys.exit(run_exit())
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/core.py",
>> line 121, in __init__
>> **extra_args)
>> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
>> self.parseArgs(argv)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/core.py",
>> line 145, in parseArgs
>> self.config.configure(argv, doc=self.usage())
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/config.py",
>> line 347, in configure
>> self.plugins.begin()
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/plugins/manager.py",
>> line 99, in __call__
>> return self.call(*arg, **kw)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/nose/plugins/manager.py",
>> line 167, in simple
>> result = meth(*arg, **kw)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/pylons/test.py",
>> line 74, in begin
>> relative_to=path)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>> line 247, in loadapp
>> return loadobj(APP, uri, name=name, **kw)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>> line 272, in loadobj
>> return context.create()
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>> line 710, in create
>> return self.object_type.invoke(self)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>> line 146, in invoke
>> return fix_call(context.object, context.global_conf, **context.local_conf)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/deploy/util.py",
>> line 55, in fix_call
>> val = callable(*args, **kw)
>> File "/vagrant/src/ckan/ckan/config/middleware/__init__.py", line
>> 48, in make_app
>> **app_conf)
>> File "/vagrant/src/ckan/ckan/config/middleware/pylons_app.py", line
>> 113, in make_pylons_stack
>> who_parser.parse(open(app_conf['who.config_file']))
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
>> line 86, in parse
>> obj = self._makePlugin(name, IPlugin, options)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
>> line 40, in _makePlugin
>> obj = _resolve(name)
>> File "/home/vagrant/ckan/local/lib/python2.7/site-packages/repoze/who/config.py",
>> line 23, in _resolve
>> return EntryPoint.parse('x=%s' % name).resolve()
>> AttributeError: 'EntryPoint' object has no attribute 'resolve'
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
More information about the ckan-dev
mailing list