Permalink
Browse files

Now using buildout for development, packaging.

  • Loading branch information...
1 parent 6d6881c commit 98d5c6ec74b1a66c967779139b20bd8df482b921 @jacobian jacobian committed Aug 17, 2009
Showing with 167 additions and 28 deletions.
  1. +9 −0 .gitignore
  2. +11 −17 README.rst
  3. +78 −0 bootstrap.py
  4. +29 −0 buildout.cfg
  5. 0 jellyroll/__init__.py
  6. +40 −0 setup.py
  7. 0 {testproject → src/jellyroll}/__init__.py
  8. 0 { → src}/jellyroll/admin.py
  9. 0 { → src}/jellyroll/evolutions/__init__.py
  10. 0 { → src}/jellyroll/evolutions/bookmark_urls_max_length.sql
  11. 0 { → src}/jellyroll/evolutions/codecommit_add_new_revision.sql
  12. 0 { → src}/jellyroll/evolutions/codecommit_drop_old_revision.sql
  13. 0 { → src}/jellyroll/evolutions/item_id_to_text.sql
  14. 0 { → src}/jellyroll/evolutions/item_tags_max_length.sql
  15. 0 { → src}/jellyroll/evolutions/item_url_max_length.sql
  16. 0 { → src}/jellyroll/evolutions/photo_add_farm_id.sql
  17. 0 { → src}/jellyroll/evolutions/photo_id_to_string.sql
  18. 0 { → src}/jellyroll/fixtures/bookmarks.json
  19. 0 { → src}/jellyroll/fixtures/codecommits.json
  20. 0 { → src}/jellyroll/fixtures/initial_data.json
  21. 0 { → src}/jellyroll/fixtures/photos.json
  22. 0 { → src}/jellyroll/fixtures/tracks.json
  23. 0 { → src}/jellyroll/fixtures/videos.json
  24. 0 { → src}/jellyroll/fixtures/websearches.json
  25. 0 {jellyroll/views → src/jellyroll/management}/__init__.py
  26. 0 {jellyroll/urls → src/jellyroll/management/commands}/__init__.py
  27. 0 { → src}/jellyroll/management/commands/jellyroll_update.py
  28. 0 { → src}/jellyroll/managers.py
  29. 0 { → src}/jellyroll/models.py
  30. 0 { → src}/jellyroll/providers/__init__.py
  31. 0 { → src}/jellyroll/providers/delicious.py
  32. 0 { → src}/jellyroll/providers/flickr.py
  33. 0 { → src}/jellyroll/providers/gitscm.py
  34. 0 { → src}/jellyroll/providers/gsearch.py
  35. 0 { → src}/jellyroll/providers/lastfm.py
  36. 0 { → src}/jellyroll/providers/magnolia.py
  37. 0 { → src}/jellyroll/providers/pownce.py
  38. 0 { → src}/jellyroll/providers/svn.py
  39. 0 { → src}/jellyroll/providers/twitter.py
  40. 0 { → src}/jellyroll/providers/utils/__init__.py
  41. 0 { → src}/jellyroll/providers/utils/anyetree.py
  42. 0 { → src}/jellyroll/providers/youtube.py
  43. 0 { → src}/jellyroll/templates/jellyroll/base.html
  44. 0 { → src}/jellyroll/templates/jellyroll/calendar/day.html
  45. 0 { → src}/jellyroll/templates/jellyroll/calendar/month.html
  46. 0 { → src}/jellyroll/templates/jellyroll/calendar/today.html
  47. 0 { → src}/jellyroll/templates/jellyroll/calendar/year.html
  48. 0 { → src}/jellyroll/templates/jellyroll/snippets/item.html
  49. 0 { → src}/jellyroll/templates/jellyroll/snippets/item.txt
  50. 0 { → src}/jellyroll/templatetags/__init__.py
  51. 0 { → src}/jellyroll/templatetags/jellyroll.py
  52. 0 { → src}/jellyroll/tests/__init__.py
  53. 0 { → src}/jellyroll/tests/test_items.py
  54. 0 { → src}/jellyroll/tests/test_misc.py
  55. 0 { → src}/jellyroll/tests/test_tags.py
  56. 0 { → src}/jellyroll/tests/test_views.py
  57. 0 testproject/settings.py → src/jellyroll/testsettings.py
  58. 0 {jellyroll/management/commands → src/jellyroll/urls}/__init__.py
  59. 0 { → src}/jellyroll/urls/calendar.py
  60. 0 { → src}/jellyroll/urls/tags.py
  61. 0 {jellyroll/management → src/jellyroll/views}/__init__.py
  62. 0 { → src}/jellyroll/views/calendar.py
  63. 0 { → src}/jellyroll/views/tags.py
  64. +0 −11 testproject/manage.py
View
9 .gitignore
@@ -1 +1,10 @@
*.pyc
+*.pyo
+.installed.cfg
+bin
+develop-eggs
+dist
+downloads
+eggs
+parts
+src/*.egg-info
View
28 README.rst
@@ -1,34 +1,28 @@
Prerequisites
-------------
-* Django 1.0
-* PIL
-* dateutil
-* django-tagging, SVN r149+
+Required by setup.py:
+
+ * django-tagging (0.3pre)
+ * Django 1.0+
+ * PIL
+ * python-dateutil
+ * pytz
Optional
--------
-* pytz (1)
+* XXX (for git support)
+* pysvn (for SVN support)
Installation
------------
+
You need to set up which providers you are going to use, e.g.
::
JELLYROLL_PROVIDERS = (
'jellyroll.providers.delicious',
'jellyroll.providers.flickr',
- )
-
-Notes
------
-
-1. pytz is included in order to support date translation of providers whose sources
- do not syndicate item dates in your local timezone (typically these services have
- settings for which you can specify your timezone). These services currently include:
-
- * gitscm (stores all dates UTC as time_struct)
- * lastfm (publishes all dates in RSS as UTC timestamp)
- * twitter (publishes all dates in RSS as UTC string)
+ )
View
78 bootstrap.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+try:
+ import pkg_resources
+except ImportError:
+ ez = {}
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ import pkg_resources
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+ quote(tmpeggs), 'zc.buildout'],
+ env=dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
View
29 buildout.cfg
@@ -0,0 +1,29 @@
+[buildout]
+parts = python django-1.0 django-1.1
+develop = .
+eggs = jellyroll
+
+[python]
+recipe = zc.recipe.egg
+interpreter = python
+eggs = ${buildout:eggs}
+
+[django-1.0]
+recipe = djangorecipe
+version = 1.0.3
+projectegg = jellyroll
+project = jellyroll
+settings = testsettings
+test = jellyroll
+testrunner = test-1.0
+eggs = ${buildout:eggs}
+
+[django-1.1]
+recipe = djangorecipe
+version = 1.1
+projectegg = jellyroll
+project = jellyroll
+settings = testsettings
+test = jellyroll
+testrunner = test-1.1
+eggs = ${buildout:eggs}
View
0 jellyroll/__init__.py
No changes.
View
40 setup.py
@@ -0,0 +1,40 @@
+import os
+from setuptools import setup, find_packages
+
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+setup(
+ name = "jellyroll",
+ version = "1.0",
+ url = 'http://github.com/jacobian/jellyroll',
+ license = 'BSD',
+ description = "You keep personal data in all sorts of places on the internets. Jellyroll brings them together onto your own site.",
+ long_description = read('README.rst'),
+
+ author = 'Jacob Kaplan-Moss',
+ author_email = 'jacob@jacobian.org',
+
+ packages = find_packages('src'),
+ package_dir = {'': 'src'},
+
+ install_requires = [
+ 'django-tagging==0.3pre',
+ 'Django>=1.0',
+ 'PIL',
+ 'python-dateutil',
+ 'pytz==2009e',
+ 'setuptools',
+ ],
+ dependency_links = ['http://pypi.pinaxproject.com/'],
+
+ classifiers = [
+ 'Development Status :: 4 - Beta',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Internet :: WWW/HTTP',
+ ]
+)
View
0 testproject/__init__.py → src/jellyroll/__init__.py
File renamed without changes.
View
0 jellyroll/admin.py → src/jellyroll/admin.py
File renamed without changes.
View
0 jellyroll/evolutions/__init__.py → src/jellyroll/evolutions/__init__.py
File renamed without changes.
View
0 ...l/evolutions/bookmark_urls_max_length.sql → ...l/evolutions/bookmark_urls_max_length.sql
File renamed without changes.
View
0 ...volutions/codecommit_add_new_revision.sql → ...volutions/codecommit_add_new_revision.sql
File renamed without changes.
View
0 ...olutions/codecommit_drop_old_revision.sql → ...olutions/codecommit_drop_old_revision.sql
File renamed without changes.
View
0 jellyroll/evolutions/item_id_to_text.sql → src/jellyroll/evolutions/item_id_to_text.sql
File renamed without changes.
View
0 ...yroll/evolutions/item_tags_max_length.sql → ...yroll/evolutions/item_tags_max_length.sql
File renamed without changes.
View
0 jellyroll/evolutions/item_url_max_length.sql → ...lyroll/evolutions/item_url_max_length.sql
File renamed without changes.
View
0 jellyroll/evolutions/photo_add_farm_id.sql → ...ellyroll/evolutions/photo_add_farm_id.sql
File renamed without changes.
View
0 jellyroll/evolutions/photo_id_to_string.sql → ...llyroll/evolutions/photo_id_to_string.sql
File renamed without changes.
View
0 jellyroll/fixtures/bookmarks.json → src/jellyroll/fixtures/bookmarks.json
File renamed without changes.
View
0 jellyroll/fixtures/codecommits.json → src/jellyroll/fixtures/codecommits.json
File renamed without changes.
View
0 jellyroll/fixtures/initial_data.json → src/jellyroll/fixtures/initial_data.json
File renamed without changes.
View
0 jellyroll/fixtures/photos.json → src/jellyroll/fixtures/photos.json
File renamed without changes.
View
0 jellyroll/fixtures/tracks.json → src/jellyroll/fixtures/tracks.json
File renamed without changes.
View
0 jellyroll/fixtures/videos.json → src/jellyroll/fixtures/videos.json
File renamed without changes.
View
0 jellyroll/fixtures/websearches.json → src/jellyroll/fixtures/websearches.json
File renamed without changes.
View
0 jellyroll/views/__init__.py → src/jellyroll/management/__init__.py
File renamed without changes.
View
0 jellyroll/urls/__init__.py → ...jellyroll/management/commands/__init__.py
File renamed without changes.
View
0 ...l/management/commands/jellyroll_update.py → ...l/management/commands/jellyroll_update.py
File renamed without changes.
View
0 jellyroll/managers.py → src/jellyroll/managers.py
File renamed without changes.
View
0 jellyroll/models.py → src/jellyroll/models.py
File renamed without changes.
View
0 jellyroll/providers/__init__.py → src/jellyroll/providers/__init__.py
File renamed without changes.
View
0 jellyroll/providers/delicious.py → src/jellyroll/providers/delicious.py
File renamed without changes.
View
0 jellyroll/providers/flickr.py → src/jellyroll/providers/flickr.py
File renamed without changes.
View
0 jellyroll/providers/gitscm.py → src/jellyroll/providers/gitscm.py
File renamed without changes.
View
0 jellyroll/providers/gsearch.py → src/jellyroll/providers/gsearch.py
File renamed without changes.
View
0 jellyroll/providers/lastfm.py → src/jellyroll/providers/lastfm.py
File renamed without changes.
View
0 jellyroll/providers/magnolia.py → src/jellyroll/providers/magnolia.py
File renamed without changes.
View
0 jellyroll/providers/pownce.py → src/jellyroll/providers/pownce.py
File renamed without changes.
View
0 jellyroll/providers/svn.py → src/jellyroll/providers/svn.py
File renamed without changes.
View
0 jellyroll/providers/twitter.py → src/jellyroll/providers/twitter.py
File renamed without changes.
View
0 jellyroll/providers/utils/__init__.py → src/jellyroll/providers/utils/__init__.py
File renamed without changes.
View
0 jellyroll/providers/utils/anyetree.py → src/jellyroll/providers/utils/anyetree.py
File renamed without changes.
View
0 jellyroll/providers/youtube.py → src/jellyroll/providers/youtube.py
File renamed without changes.
View
0 jellyroll/templates/jellyroll/base.html → src/jellyroll/templates/jellyroll/base.html
File renamed without changes.
View
0 ...oll/templates/jellyroll/calendar/day.html → ...oll/templates/jellyroll/calendar/day.html
File renamed without changes.
View
0 ...l/templates/jellyroll/calendar/month.html → ...l/templates/jellyroll/calendar/month.html
File renamed without changes.
View
0 ...l/templates/jellyroll/calendar/today.html → ...l/templates/jellyroll/calendar/today.html
File renamed without changes.
View
0 ...ll/templates/jellyroll/calendar/year.html → ...ll/templates/jellyroll/calendar/year.html
File renamed without changes.
View
0 ...ll/templates/jellyroll/snippets/item.html → ...ll/templates/jellyroll/snippets/item.html
File renamed without changes.
View
0 ...oll/templates/jellyroll/snippets/item.txt → ...oll/templates/jellyroll/snippets/item.txt
File renamed without changes.
View
0 jellyroll/templatetags/__init__.py → src/jellyroll/templatetags/__init__.py
File renamed without changes.
View
0 jellyroll/templatetags/jellyroll.py → src/jellyroll/templatetags/jellyroll.py
File renamed without changes.
View
0 jellyroll/tests/__init__.py → src/jellyroll/tests/__init__.py
File renamed without changes.
View
0 jellyroll/tests/test_items.py → src/jellyroll/tests/test_items.py
File renamed without changes.
View
0 jellyroll/tests/test_misc.py → src/jellyroll/tests/test_misc.py
File renamed without changes.
View
0 jellyroll/tests/test_tags.py → src/jellyroll/tests/test_tags.py
File renamed without changes.
View
0 jellyroll/tests/test_views.py → src/jellyroll/tests/test_views.py
File renamed without changes.
View
0 testproject/settings.py → src/jellyroll/testsettings.py
File renamed without changes.
View
0 jellyroll/management/commands/__init__.py → src/jellyroll/urls/__init__.py
File renamed without changes.
View
0 jellyroll/urls/calendar.py → src/jellyroll/urls/calendar.py
File renamed without changes.
View
0 jellyroll/urls/tags.py → src/jellyroll/urls/tags.py
File renamed without changes.
View
0 jellyroll/management/__init__.py → src/jellyroll/views/__init__.py
File renamed without changes.
View
0 jellyroll/views/calendar.py → src/jellyroll/views/calendar.py
File renamed without changes.
View
0 jellyroll/views/tags.py → src/jellyroll/views/tags.py
File renamed without changes.
View
11 testproject/manage.py
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-from django.core.management import execute_manager
-try:
- import settings # Assumed to be in the same directory.
-except ImportError:
- import sys
- sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
- sys.exit(1)
-
-if __name__ == "__main__":
- execute_manager(settings)

0 comments on commit 98d5c6e

Please sign in to comment.