diff --git a/bin/travis-build b/bin/travis-build index 612cefb937c..51e633781b4 100755 --- a/bin/travis-build +++ b/bin/travis-build @@ -23,7 +23,9 @@ sudo -u postgres psql -c "CREATE USER datastore_default WITH PASSWORD 'pass';" sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' sudo -u postgres psql -c 'CREATE DATABASE datastore_test WITH OWNER ckan_default;' -pip install -r requirements.txt -r dev-requirements.txt --use-mirrors +export PIP_USE_MIRRORS=true +pip install -r requirements.txt +pip install -r dev-requirements.txt python setup.py develop @@ -68,5 +70,5 @@ NOSE_ERROR=$? [ "0" -ne "$MOCHA_ERROR" ] && echo MOCKA tests have failed [ "0" -ne "$NOSE_ERROR" ] && echo NOSE tests have failed -# If an error occured in our tests make sure travis knows +# If an error occurred in our tests make sure travis knows exit `expr $MOCHA_ERROR + $NOSE_ERROR` diff --git a/ckan/controllers/feed.py b/ckan/controllers/feed.py index c22aa1080c7..d45ac119ae7 100644 --- a/ckan/controllers/feed.py +++ b/ckan/controllers/feed.py @@ -195,14 +195,14 @@ def group(self, id): alternate_url = self._alternate_url(params, groups=id) return self.output_feed(results, - feed_title=u'%s - Group: "%s"' % (g.site_title, - group_dict['title']), + feed_title=u'%s - Group: "%s"' % + (g.site_title, group_dict['title']), feed_description=u'Recently created or ' 'updated datasets on %s by group: "%s"' % (g.site_title, group_dict['title']), feed_link=alternate_url, - feed_guid=_create_atom_id( - u'/feeds/groups/%s.atom' % id), + feed_guid=_create_atom_id + (u'/feeds/groups/%s.atom' % id), feed_url=feed_url, navigation_urls=navigation_urls) @@ -233,8 +233,8 @@ def tag(self, id): 'updated datasets on %s by tag: "%s"' % (g.site_title, id), feed_link=alternate_url, - feed_guid=_create_atom_id( - u'/feeds/tag/%s.atom' % id), + feed_guid=_create_atom_id + (u'/feeds/tag/%s.atom' % id), feed_url=feed_url, navigation_urls=navigation_urls) @@ -261,8 +261,8 @@ def general(self): feed_description=u'Recently created or ' 'updated datasets on %s' % g.site_title, feed_link=alternate_url, - feed_guid=_create_atom_id( - u'/feeds/dataset.atom'), + feed_guid=_create_atom_id + (u'/feeds/dataset.atom'), feed_url=feed_url, navigation_urls=navigation_urls) @@ -315,8 +315,8 @@ def custom(self): ' datasets on %s. Custom query: \'%s\'' % (g.site_title, q), feed_link=alternate_url, - feed_guid=_create_atom_id( - u'/feeds/custom.atom?%s' % search_url_params), + feed_guid=_create_atom_id + (u'/feeds/custom.atom?%s' % search_url_params), feed_url=feed_url, navigation_urls=navigation_urls) diff --git a/ckanext/datastore/db.py b/ckanext/datastore/db.py index 391829e412b..4dc41ff974d 100644 --- a/ckanext/datastore/db.py +++ b/ckanext/datastore/db.py @@ -517,7 +517,7 @@ def alter_table(context, data_dict): raise ValidationError({ 'fields': [('Supplied field "{0}" not ' 'present or in wrong order').format( - field['id'])] + field['id'])] }) ## no need to check type as field already defined. continue diff --git a/ckanext/datastore/tests/test_dump.py b/ckanext/datastore/tests/test_dump.py index ce55cac4ba6..041105af986 100644 --- a/ckanext/datastore/tests/test_dump.py +++ b/ckanext/datastore/tests/test_dump.py @@ -43,7 +43,7 @@ def setup_class(cls): 'nested': ['b', {'moo': 'moo'}], u'characters': [u'Princess Anna', u'Sergius']}, {u'b\xfck': 'warandpeace', 'author': 'tolstoy', - 'nested': {'a': 'b'}}] + 'nested': {'a': 'b'}}] } postparams = '%s=1' % json.dumps(cls.data) auth = {'Authorization': str(cls.sysadmin_user.apikey)} diff --git a/dev-requirements.txt b/dev-requirements.txt index 41611c81aec..a445712d239 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,9 +1,9 @@ # These are packages that required when running ckan tests + -e git+https://github.com/okfn/ckanclient@a315a72eef74dda4831acd022ef84a1246803c73#egg=ckanclient-dev docutils==0.8.1 -httpretty==0.6.0 -nose==1.2.1 -pep8==1.4.5 -pip-tools==0.3.1 +httpretty==0.6.2 +nose==1.3.0 +pep8==1.4.6 Sphinx==1.2b1 polib==1.0.3 diff --git a/requirements.in b/requirements.in new file mode 100644 index 00000000000..50bbd11b23d --- /dev/null +++ b/requirements.in @@ -0,0 +1,31 @@ +# The file contains the direct ckan requirements. +# Use pip-compile to create a requirements.txt file from this + +Babel>=0.9.6,<1.0.0 # newer versions cause problems with when switching languages +Jinja2==2.6 # newer version causes problem in CkanInternationalizationExtension.parse + # when creating a new dataset +Pylons==0.9.7 +Genshi==0.6 +WebTest==1.4.3 # need to pin this so that Pylons does not install a newer version that conflicts with WebOb==1.0.8 +apachemiddleware>=0.1.1 +fanstatic==0.12 +FormAlchemy>=1.4.2 +ofs==0.4.1 +Pairtree==0.7.1-T +paste==1.7.5.1 +psycopg2==2.4.5 +python-dateutil>=1.5.0,<2.0.0 +pyutilib.component.core==4.5.3 +repoze.who-friendlyform==1.0.8 +repoze.who.plugins.openid==0.5.3 +repoze.who==1.0.19 +requests==1.1.0 +Routes==1.13 +solrpy==0.9.5 +sqlalchemy-migrate==0.7.2 +SQLAlchemy==0.7.8 +vdm==0.11 +WebHelpers==1.3 +WebOb==1.0.8 +zope.interface==4.0.1 +unicodecsv>=0.9 diff --git a/requirements.txt b/requirements.txt index 79fd67948dd..e16309daa8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,46 +1,44 @@ -# a Python virtual environment) after you have installed CKAN, with a command -# instructions in CKAN's documentation for full installation instructions. -# like: pip install -r requirements.txt. See the Install from Source -# This file lists CKAN's dependencies so that you can install them (e.g. into -apachemiddleware==0.1.1 Babel==0.9.6 Beaker==1.6.4 -decorator==3.4.0 -fanstatic==0.12 -FormAlchemy==1.4.2 +FormAlchemy==1.4.3 FormEncode==1.2.6 Genshi==0.6 Jinja2==2.6 -Mako==0.7.3 -MarkupSafe==0.15 -ofs==0.4.1 +Mako==0.8.1 +MarkupSafe==0.18 Pairtree==0.7.1-T Paste==1.7.5.1 PasteDeploy==1.5.0 PasteScript==1.7.5 -psycopg2==2.4.5 Pygments==1.6 Pylons==0.9.7 +Routes==1.13 +SQLAlchemy==0.7.8 +Tempita==0.5.1 +WebError==0.10.3 +WebHelpers==1.3 +WebOb==1.0.8 +WebTest==1.4.3 +apachemiddleware==0.1.1 +argparse==1.2.1 +decorator==3.4.0 +distribute==0.6.34 +fanstatic==0.12 +nose==1.3.0 +ofs==0.4.1 +psycopg2==2.4.5 python-dateutil==1.5 python-openid==2.2.5 pyutilib.component.core==4.5.3 repoze.lru==0.6 +repoze.who==1.0.19 repoze.who-friendlyform==1.0.8 repoze.who.plugins.openid==0.5.3 -repoze.who==1.0.19 requests==1.1.0 -Routes==1.13 -simplejson==3.1.2 +simplejson==3.3.0 solrpy==0.9.5 sqlalchemy-migrate==0.7.2 -SQLAlchemy==0.7.8 -Tempita==0.5.1 -unicodecsv==0.9.0 +unicodecsv==0.9.4 vdm==0.11 -verlib==0.1 -virtualenv==1.9.1 -WebError==0.10.3 -WebHelpers==1.3 -WebOb==1.0.8 -WebTest==1.4.3 +wsgiref==0.1.2 zope.interface==4.0.1 diff --git a/setup.py b/setup.py index f4e97942047..276e03a5fdf 100644 --- a/setup.py +++ b/setup.py @@ -7,52 +7,6 @@ from ckan import __version__, __description__, __long_description__, __license__ -install_requires = [ - 'Babel>=0.9.6', - 'Genshi==0.6', - 'Jinja2>=2.6', - 'Pylons==0.9.7', - 'WebTest==1.4.3', # need to pin this so that Pylons does not install a newer version that conflicts with WebOb==1.0.8 - 'apachemiddleware>=0.1.1', - 'babel>=0.9.6', - 'fanstatic==0.12', - 'formalchemy>=1.4.2', - 'markupsafe>=0.15', - 'ofs>=0.4.1', - 'pairtree>=0.7.1-T', - 'paste>=1.7.5.1', - 'psycopg2==2.4.5', - 'python-dateutil>=1.5.0,<2.0.0', - 'pyutilib.component.core>=4.5.3', - 'repoze.who-friendlyform>=1.0.8', - 'repoze.who.plugins.openid>=0.5.3', - 'repoze.who==1.0.19', - 'requests==1.1.0', - 'routes>=1.13', - 'solrpy>=0.9.5', - 'sqlalchemy-migrate>=0.7.2', - 'sqlalchemy==0.7.8', - 'tempita>=0.5.1', - 'vdm>=0.11', - 'webhelpers>=1.3', - 'webob==1.0.8', - 'zope.interface>=4.0.1', - 'unicodecsv>=0.9', -] - -dev_requires = [ - 'ckanclient>=0.10', - 'docutils>=0.8.1', - 'httpretty>=0.5', - 'nose>=1.2.1', - 'pip-tools>=0.3.1', - 'Sphinx>=1.2b1', -] - -dependency_links = [ - 'https://github.com/okfn/ckanclient/tarball/master#egg=ckanclient' -] - setup( name='ckan', version=__version__, @@ -63,8 +17,6 @@ description=__description__, keywords='data packaging component tool server', long_description =__long_description__, - install_requires=install_requires, - extras_require={'dev': dev_requires}, zip_safe=False, packages=find_packages(exclude=['ez_setup']), namespace_packages=['ckanext', 'ckanext.stats'],