Permalink
Browse files

Install was broken, release 2.5.3

  • Loading branch information...
1 parent d2f47ce commit 2bfdc6229b289bea90fe214c316d9bb7c325bed9 @ask committed Apr 13, 2012
Showing with 64 additions and 12 deletions.
  1. +13 −1 Changelog
  2. +1 −1 README.rst
  3. +4 −2 djcelery/__init__.py
  4. +1 −1 docs/introduction.rst
  5. +45 −7 setup.py
View
@@ -5,11 +5,23 @@
.. contents::
:local:
+.. _version-2.5.3:
+
+2.5.3
+=====
+:release-date: 2012-04-13 06:16 P.M GMT
+:by: Ask Solem
+
+* 2.5.2 release broke installation because of an import in the package.
+
+ Fixed by not having setup.py import the djcelery module anymore,
+ but rather parsing the package file for metadata.
+
.. _version-2.5.2:
2.5.2
=====
-:release-date: 2012-04-12 05:00 P.M GMT
+:release-date: 2012-04-13 05:00 P.M GMT
:by: Ask Solem
.. _v251-news:
View
@@ -4,7 +4,7 @@
.. image:: http://cloud.github.com/downloads/ask/celery/celery_128.png
-:Version: 2.5.2
+:Version: 2.5.3
:Web: http://celeryproject.org/
:Download: http://pypi.python.org/pypi/django-celery/
:Source: http://github.com/ask/django-celery/
View
@@ -1,17 +1,19 @@
"""Django Celery Integration."""
+# :copyright: (c) 2009 - 2012 by Ask Solem.
+# :license: BSD, see LICENSE for more details.
from __future__ import absolute_import
import os
-VERSION = (2, 5, 2)
-
+VERSION = (2, 5, 3)
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Ask Solem"
__contact__ = "ask@celeryproject.org"
__homepage__ = "http://celeryproject.org"
__docformat__ = "restructuredtext"
__license__ = "BSD (3 clause)"
+# -eof meta-
def setup_loader():
os.environ.setdefault("CELERY_LOADER", "djcelery.loaders.DjangoLoader")
View
@@ -4,7 +4,7 @@
.. image:: http://cloud.github.com/downloads/ask/celery/celery_128.png
-:Version: 2.5.2
+:Version: 2.5.3
:Web: http://celeryproject.org/
:Download: http://pypi.python.org/pypi/django-celery/
:Source: http://github.com/ask/django-celery/
View
@@ -12,7 +12,45 @@
from setuptools import setup, Command # noqa
from distutils.command.install import INSTALL_SCHEMES
-import djcelery as distmeta
+# -*- Distribution Meta -*-
+NAME = "django-celery"
+
+import re
+re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)')
+re_vers = re.compile(r'VERSION\s*=\s*\((.*?)\)')
+re_doc = re.compile(r'^"""(.+?)"""')
+rq = lambda s: s.strip("\"'")
+
+def add_default(m):
+ attr_name, attr_value = m.groups()
+ return ((attr_name, rq(attr_value)), )
+
+
+def add_version(m):
+ v = list(map(rq, m.groups()[0].split(", ")))
+ return (("VERSION", ".".join(v[0:3]) + "".join(v[3:])), )
+
+
+def add_doc(m):
+ return (("doc", m.groups()[0]), )
+
+pats = {re_meta: add_default,
+ re_vers: add_version,
+ re_doc: add_doc}
+here = os.path.abspath(os.path.dirname(__file__))
+meta_fh = open(os.path.join(here, "djcelery/__init__.py"))
+try:
+ meta = {}
+ for line in meta_fh:
+ if line.strip() == '# -eof meta-':
+ break
+ for pattern, handler in pats.items():
+ m = pattern.match(line.strip())
+ if m:
+ meta.update(handler(m))
+finally:
+ meta_fh.close()
+
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
@@ -122,12 +160,12 @@ def extra_args(self):
setup(
- name='django-celery',
- version=distmeta.__version__,
- description=distmeta.__doc__,
- author=distmeta.__author__,
- author_email=distmeta.__contact__,
- url=distmeta.__homepage__,
+ name=NAME,
+ version=meta["VERSION"],
+ description=meta["doc"],
+ author=meta["author"],
+ author_email=meta["contact"],
+ url=meta["homepage"],
platforms=["any"],
license="BSD",
packages=packages,

0 comments on commit 2bfdc62

Please sign in to comment.